summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/head_book3s_32.S
diff options
context:
space:
mode:
authorChristophe Leroy <christophe.leroy@csgroup.eu>2020-11-25 08:10:46 +0100
committerMichael Ellerman <mpe@ellerman.id.au>2020-12-03 15:01:31 +0100
commit035b19a15a98907916a42a6b1d025877c42f10ad (patch)
tree0ef1ff338dcaea2bb5ce5e59233f1e7ce17f7204 /arch/powerpc/kernel/head_book3s_32.S
parentocxl: Add new kernel traces (diff)
downloadlinux-035b19a15a98907916a42a6b1d025877c42f10ad.tar.xz
linux-035b19a15a98907916a42a6b1d025877c42f10ad.zip
powerpc/32s: Always map kernel text and rodata with BATs
Since commit 2b279c0348af ("powerpc/32s: Allow mapping with BATs with DEBUG_PAGEALLOC"), there is no real situation where mapping without BATs is required. In order to simplify memory handling, always map kernel text and rodata with BATs even when "nobats" kernel parameter is set. Also fix the 603 TLB miss exceptions that don't require anymore kernel page table if DEBUG_PAGEALLOC. Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/da51f7ec632825a4ce43290a904aad61648408c0.1606285013.git.christophe.leroy@csgroup.eu
Diffstat (limited to 'arch/powerpc/kernel/head_book3s_32.S')
-rw-r--r--arch/powerpc/kernel/head_book3s_32.S4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/head_book3s_32.S b/arch/powerpc/kernel/head_book3s_32.S
index bbcc84c5cf5f..757aed0c5764 100644
--- a/arch/powerpc/kernel/head_book3s_32.S
+++ b/arch/powerpc/kernel/head_book3s_32.S
@@ -457,13 +457,13 @@ InstructionTLBMiss:
*/
/* Get PTE (linux-style) and check access */
mfspr r3,SPRN_IMISS
-#if defined(CONFIG_MODULES) || defined(CONFIG_DEBUG_PAGEALLOC)
+#ifdef CONFIG_MODULES
lis r1, TASK_SIZE@h /* check if kernel address */
cmplw 0,r1,r3
#endif
mfspr r2, SPRN_SPRG_PGDIR
li r1,_PAGE_PRESENT | _PAGE_ACCESSED | _PAGE_EXEC
-#if defined(CONFIG_MODULES) || defined(CONFIG_DEBUG_PAGEALLOC)
+#ifdef CONFIG_MODULES
bgt- 112f
lis r2, (swapper_pg_dir - PAGE_OFFSET)@ha /* if kernel address, use */
addi r2, r2, (swapper_pg_dir - PAGE_OFFSET)@l /* kernel page table */