Skip to content

Commit 5a528eb

Browse files
chleroympe
authored andcommitted
powerpc/chrp: Fix enter_rtas() with CONFIG_VMAP_STACK
With CONFIG_VMAP_STACK, data MMU has to be enabled to read data on the stack. Fixes: cd08f10 ("powerpc/32s: Enable CONFIG_VMAP_STACK") Signed-off-by: Christophe Leroy <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/d2330584f8c42d3039896e2b56f5d39676dc919c.1581669558.git.christophe.leroy@c-s.fr
1 parent 232ca1e commit 5a528eb

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

arch/powerpc/kernel/entry_32.S

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1354,12 +1354,17 @@ _GLOBAL(enter_rtas)
13541354
mtspr SPRN_SRR0,r8
13551355
mtspr SPRN_SRR1,r9
13561356
RFI
1357-
1: tophys(r9,r1)
1357+
1: tophys_novmstack r9, r1
1358+
#ifdef CONFIG_VMAP_STACK
1359+
li r0, MSR_KERNEL & ~MSR_IR /* can take DTLB miss */
1360+
mtmsr r0
1361+
isync
1362+
#endif
13581363
lwz r8,INT_FRAME_SIZE+4(r9) /* get return address */
13591364
lwz r9,8(r9) /* original msr value */
13601365
addi r1,r1,INT_FRAME_SIZE
13611366
li r0,0
1362-
tophys(r7, r2)
1367+
tophys_novmstack r7, r2
13631368
stw r0, THREAD + RTAS_SP(r7)
13641369
mtspr SPRN_SRR0,r8
13651370
mtspr SPRN_SRR1,r9

0 commit comments

Comments
 (0)