Le 10/05/2022 à 13:18, Alexander Graf a écrit :
Commit 863771a28e27 ("powerpc/32s: Convert switch_mmu_context() to C")Is the system ready to handle a DSI in case the stack is not mapped ?
moved the switch_mmu_context() to C. While in principle a good idea, it
meant that the function now uses the stack. The stack is not accessible
from real mode though.
So to keep calling the function, let's turn on MSR_DR while we call it.
That way, all pointer references to the stack are handled virtually.
In addition, make sure to save/restore r12 in an SPRG, as it may getOops, sorry for that. I didn't realise that there was other callers to
clobbered by the C function.
Reported-by: Matt Evans <matt@xxxxxxxxxx>
Fixes: 863771a28e27 ("powerpc/32s: Convert switch_mmu_context() to C")
switch_mmu_context() than switch_mm_irqs_off().