Skip to content

Commit d4bf905

Browse files
chleroympe
authored andcommitted
powerpc: Fix CONFIG_TRACE_IRQFLAGS with CONFIG_VMAP_STACK
When CONFIG_PROVE_LOCKING is selected together with (now default) CONFIG_VMAP_STACK, kernel enter deadlock during boot. At the point of checking whether interrupts are enabled or not, the value of MSR saved on stack is read using the physical address of the stack. But at this point, when using VMAP stack the DATA MMU translation has already been re-enabled, leading to deadlock. Don't use the physical address of the stack when CONFIG_VMAP_STACK is set. Signed-off-by: Christophe Leroy <[email protected]> Reported-by: Guenter Roeck <[email protected]> Fixes: 0284748 ("powerpc/32: prepare for CONFIG_VMAP_STACK") Tested-by: Guenter Roeck <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/daeacdc0dec0416d1c587cc9f9e7191ad3068dc0.1581095957.git.christophe.leroy@c-s.fr
1 parent 9dc086f commit d4bf905

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/powerpc/kernel/entry_32.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ transfer_to_handler_cont:
214214
* To speed up the syscall path where interrupts stay on, let's check
215215
* first if we are changing the MSR value at all.
216216
*/
217-
tophys(r12, r1)
217+
tophys_novmstack r12, r1
218218
lwz r12,_MSR(r12)
219219
andi. r12,r12,MSR_EE
220220
bne 1f

0 commit comments

Comments
 (0)