]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitcb349d408fb0294499d0f230a06f217ae42b79a3
treefcffd01998c16028755fad9d92251d0f4ba62d19
parent43225c098156a446b645bca29b52ccd6ed56ced9
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: 3f27476060b0 ("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