Commit 16754d25 authored by Nicholas Piggin's avatar Nicholas Piggin Committed by Michael Ellerman

powerpc/64s/exceptions: Change irq reconcile for NMIs from reusing _DAR to RESULT

A spare interrupt stack slot is needed to save irq state when
reconciling NMIs (sreset and decrementer soft-nmi). _DAR is used
for this, but we want to reconcile machine checks as well, which
do use _DAR. Switch to using RESULT instead, as it's used by
system calls.
Signed-off-by: default avatarNicholas Piggin <npiggin@gmail.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200508043408.886394-4-npiggin@gmail.com
parent ac2a2a14
...@@ -939,13 +939,13 @@ EXC_COMMON_BEGIN(system_reset_common) ...@@ -939,13 +939,13 @@ EXC_COMMON_BEGIN(system_reset_common)
* the right thing. We do not want to reconcile because that goes * the right thing. We do not want to reconcile because that goes
* through irq tracing which we don't want in NMI. * through irq tracing which we don't want in NMI.
* *
* Save PACAIRQHAPPENED to _DAR (otherwise unused), and set HARD_DIS * Save PACAIRQHAPPENED to RESULT (otherwise unused), and set HARD_DIS
* as we are running with MSR[EE]=0. * as we are running with MSR[EE]=0.
*/ */
li r10,IRQS_ALL_DISABLED li r10,IRQS_ALL_DISABLED
stb r10,PACAIRQSOFTMASK(r13) stb r10,PACAIRQSOFTMASK(r13)
lbz r10,PACAIRQHAPPENED(r13) lbz r10,PACAIRQHAPPENED(r13)
std r10,_DAR(r1) std r10,RESULT(r1)
ori r10,r10,PACA_IRQ_HARD_DIS ori r10,r10,PACA_IRQ_HARD_DIS
stb r10,PACAIRQHAPPENED(r13) stb r10,PACAIRQHAPPENED(r13)
...@@ -966,7 +966,7 @@ EXC_COMMON_BEGIN(system_reset_common) ...@@ -966,7 +966,7 @@ EXC_COMMON_BEGIN(system_reset_common)
/* /*
* Restore soft mask settings. * Restore soft mask settings.
*/ */
ld r10,_DAR(r1) ld r10,RESULT(r1)
stb r10,PACAIRQHAPPENED(r13) stb r10,PACAIRQHAPPENED(r13)
ld r10,SOFTE(r1) ld r10,SOFTE(r1)
stb r10,PACAIRQSOFTMASK(r13) stb r10,PACAIRQSOFTMASK(r13)
...@@ -2743,7 +2743,7 @@ EXC_COMMON_BEGIN(soft_nmi_common) ...@@ -2743,7 +2743,7 @@ EXC_COMMON_BEGIN(soft_nmi_common)
li r10,IRQS_ALL_DISABLED li r10,IRQS_ALL_DISABLED
stb r10,PACAIRQSOFTMASK(r13) stb r10,PACAIRQSOFTMASK(r13)
lbz r10,PACAIRQHAPPENED(r13) lbz r10,PACAIRQHAPPENED(r13)
std r10,_DAR(r1) std r10,RESULT(r1)
ori r10,r10,PACA_IRQ_HARD_DIS ori r10,r10,PACA_IRQ_HARD_DIS
stb r10,PACAIRQHAPPENED(r13) stb r10,PACAIRQHAPPENED(r13)
...@@ -2757,7 +2757,7 @@ EXC_COMMON_BEGIN(soft_nmi_common) ...@@ -2757,7 +2757,7 @@ EXC_COMMON_BEGIN(soft_nmi_common)
/* /*
* Restore soft mask settings. * Restore soft mask settings.
*/ */
ld r10,_DAR(r1) ld r10,RESULT(r1)
stb r10,PACAIRQHAPPENED(r13) stb r10,PACAIRQHAPPENED(r13)
ld r10,SOFTE(r1) ld r10,SOFTE(r1)
stb r10,PACAIRQSOFTMASK(r13) stb r10,PACAIRQSOFTMASK(r13)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment