]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/603: Fix boot failure with DEBUG_PAGEALLOC and KFENCE
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Tue, 7 Dec 2021 06:10:05 +0000 (06:10 +0000)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 7 Feb 2022 06:18:47 +0000 (17:18 +1100)
commit7f035f8b7949713119b38494a720f1c0e4b3ed90
treeb208031d72a2f3688ddab80cf06b9bf5dedf838b
parent59e766ff6f8c2d0f016dfe97ff01198e0de898dc
powerpc/603: Fix boot failure with DEBUG_PAGEALLOC and KFENCE

Allthough kernel text is always mapped with BATs, we still have
inittext mapped with pages, so TLB miss handling is required
when CONFIG_DEBUG_PAGEALLOC or CONFIG_KFENCE is set.

The final solution should be to set a BAT that also maps inittext
but that BAT then needs to be cleared at end of init, and it will
require more changes to be able to do it properly.

As DEBUG_PAGEALLOC or KFENCE are debugging, performance is not a big
deal so let's fix it simply for now to enable easy stable application.

Fixes: 2d52255289e7 ("powerpc/32s: Always map kernel text and rodata with BATs")
Cc: stable@vger.kernel.org # v5.11+
Reported-by: Maxime Bizon <mbizon@freebox.fr>
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/aea33b4813a26bdb9378b5f273f00bd5d4abe240.1638857364.git.christophe.leroy@csgroup.eu
arch/powerpc/kernel/head_book3s_32.S