Thread (2 messages) flat view 2 messages, 2 authors, 2018-04-03

Re: powerpc/64s: return more carefully from sreset NMI

From: Michael Ellerman <hidden>
Date: 2018-04-03 16:03:41

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@gmail.com>
Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/15b4dd7981496f51c5f9262a5e0761

cheers
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help