powerpc/64s: return more carefully from sreset NMI
Michael Ellerman
patch-notifications at ellerman.id.au
Wed Apr 4 02:03:40 AEST 2018
On Mon, 2018-03-26 at 15:01:03 UTC, Nicholas Piggin wrote:
> System Reset, being an NMI, must return more carefully than other
> interrupts. It has traditionally returned via the nromal return
> from exception path, but that has a number of problems.
>
> - r13 does not get restored if returning to kernel. This is for
> interrupts which may cause a context switch, which sreset will
> never do. Interrupting OPAL (which uses a different r13) is one
> place where this causes breakage.
>
> - It may cause several other problems returning to kernel with
> preempt or TIF_EMULATE_STACK_STORE if it hits at the wrong time.
>
> It's safer just to have a simple restore and return, like machine
> check which is the other NMI.
>
> Signed-off-by: Nicholas Piggin <npiggin at gmail.com>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/15b4dd7981496f51c5f9262a5e0761
cheers
More information about the Linuxppc-dev
mailing list