aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/head_32.h
diff options
context:
space:
mode:
authorChristophe Leroy <christophe.leroy@csgroup.eu>2021-03-12 12:50:23 +0000
committerMichael Ellerman <mpe@ellerman.id.au>2021-03-29 13:22:05 +1100
commit5b1c9a0d7f3bcac591767fa1aad1323564673b26 (patch)
tree216f5d26e98b08cf88cc5b4b915ba0ae925075bf /arch/powerpc/kernel/head_32.h
parentpowerpc/32: Always enable data translation in exception prolog (diff)
downloadlinux-dev-5b1c9a0d7f3bcac591767fa1aad1323564673b26.tar.xz
linux-dev-5b1c9a0d7f3bcac591767fa1aad1323564673b26.zip
powerpc/32: Tag DAR in EXCEPTION_PROLOG_2 for the 8xx
8xx requires to tag the DAR with a magic value in order to fixup DAR on faults generated by 'dcbX', as the 8xx forgets to update the DAR for those faults. Do the tagging as early as possible, that is before enabling MMU. Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/853a2e28ca7c5fc85617037030f99fe6070c9536.1615552867.git.christophe.leroy@csgroup.eu
Diffstat (limited to 'arch/powerpc/kernel/head_32.h')
-rw-r--r--arch/powerpc/kernel/head_32.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/head_32.h b/arch/powerpc/kernel/head_32.h
index 1b707755c68e..910f86642eec 100644
--- a/arch/powerpc/kernel/head_32.h
+++ b/arch/powerpc/kernel/head_32.h
@@ -57,6 +57,12 @@
.endm
.macro EXCEPTION_PROLOG_2 handle_dar_dsisr=0
+#ifdef CONFIG_PPC_8xx
+ .if \handle_dar_dsisr
+ li r11, RPN_PATTERN
+ mtspr SPRN_DAR, r11 /* Tag DAR, to be used in DTLB Error */
+ .endif
+#endif
LOAD_REG_IMMEDIATE(r11, MSR_KERNEL & ~(MSR_IR | MSR_RI)) /* can take DTLB miss */
mtmsr r11
isync