powerpc/64s: Fix stack setup in watchdog soft_nmi_common()
authorNicholas Piggin <npiggin@gmail.com>
Sat, 29 Jul 2017 12:50:27 +0000 (22:50 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 31 Jul 2017 10:22:37 +0000 (20:22 +1000)
commitcc491f1d3583146eaee635c86b9c9227fa835c6c
tree5b2d43d7d4bf922f96f9eb5dd7485131360c4231
parentbb272221e9db79f13d454e1f3fb6b05013be985e
powerpc/64s: Fix stack setup in watchdog soft_nmi_common()

The watchdog soft-NMI exception stack setup loads a stack pointer
twice, which is an obvious error. It ends up using the system reset
interrupt (true-NMI) stack, which is also a bug because the watchdog
could be preempted by a system reset interrupt that overwrites the
NMI stack.

Change the soft-NMI to use the "emergency stack". The current kernel
stack is not used, because of the longer-term goal to prevent
asynchronous stack access using soft-disable.

Fixes: 2104180a5369 ("powerpc/64s: implement arch-specific hardlockup watchdog")
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kernel/exceptions-64s.S