projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
232ca1e
)
powerpc/chrp: Fix enter_rtas() with CONFIG_VMAP_STACK
author
Christophe Leroy
<christophe.leroy@c-s.fr>
Fri, 14 Feb 2020 08:39:50 +0000
(08:39 +0000)
committer
Michael Ellerman
<mpe@ellerman.id.au>
Tue, 18 Feb 2020 10:31:11 +0000
(21:31 +1100)
With CONFIG_VMAP_STACK, data MMU has to be enabled
to read data on the stack.
Fixes: cd08f109e262 ("powerpc/32s: Enable CONFIG_VMAP_STACK")
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link:
https://lore.kernel.org/r/d2330584f8c42d3039896e2b56f5d39676dc919c.1581669558.git.christophe.leroy@c-s.fr
arch/powerpc/kernel/entry_32.S
patch
|
blob
|
history
diff --git
a/arch/powerpc/kernel/entry_32.S
b/arch/powerpc/kernel/entry_32.S
index 0713daa651d9e469b2acedfea00d15f12ce6be70..bc056d906b516dccc52325c9b13e1337ce6b1d71 100644
(file)
--- a/
arch/powerpc/kernel/entry_32.S
+++ b/
arch/powerpc/kernel/entry_32.S
@@
-1354,12
+1354,17
@@
_GLOBAL(enter_rtas)
mtspr SPRN_SRR0,r8
mtspr SPRN_SRR1,r9
RFI
-1: tophys(r9,r1)
+1: tophys_novmstack r9, r1
+#ifdef CONFIG_VMAP_STACK
+ li r0, MSR_KERNEL & ~MSR_IR /* can take DTLB miss */
+ mtmsr r0
+ isync
+#endif
lwz r8,INT_FRAME_SIZE+4(r9) /* get return address */
lwz r9,8(r9) /* original msr value */
addi r1,r1,INT_FRAME_SIZE
li r0,0
- tophys
(r7, r2)
+ tophys
_novmstack r7, r2
stw r0, THREAD + RTAS_SP(r7)
mtspr SPRN_SRR0,r8
mtspr SPRN_SRR1,r9