]> 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)
commit8a3156749c88498d2cbba08b47852f7166a47f41
treefcffd01998c16028755fad9d92251d0f4ba62d19
parentcb53981c305b7ef12ceb48abb83b8c07a37376e3
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: 5349425ba9d7 ("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