powerpc/64e/interrupt: Fix nvgprs being clobbered
authorNicholas Piggin <npiggin@gmail.com>
Fri, 14 May 2021 04:40:08 +0000 (14:40 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 14 May 2021 07:28:54 +0000 (17:28 +1000)
commitc6ac667b07996929835b512de0e9a988977e6abc
treefcffd01998c16028755fad9d92251d0f4ba62d19
parent4ec5feec1ad029bdf7d49bc50ccc0c195eeabe93
powerpc/64e/interrupt: Fix nvgprs being clobbered

Some interrupt handlers have an "extra" that saves 1 or 2
registers (r14, r15) in the paca save area and makes them available to
use by the handler.

The change to always save nvgprs in exception handlers lead to some
interrupt handlers saving those scratch r14 / r15 registers into the
interrupt frame's GPR saves, which get restored on interrupt exit.

Fix this by always reloading those scratch registers from paca before
the EXCEPTION_COMMON that saves nvgprs.

Fixes: 4228b2c3d20e ("powerpc/64e/interrupt: always save nvgprs on interrupt")
Reported-by: Christian Zigotzky <chzigotzky@xenosoft.de>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Tested-by: Christian Zigotzky <chzigotzky@xenosoft.de>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210514044008.1955783-1-npiggin@gmail.com
arch/powerpc/kernel/exceptions-64e.S