powerpc/64s/exceptions: Change irq reconcile for NMIs from reusing _DAR to RESULT
authorNicholas Piggin <npiggin@gmail.com>
Fri, 8 May 2020 04:33:55 +0000 (14:33 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 18 May 2020 11:58:44 +0000 (21:58 +1000)
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: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200508043408.886394-4-npiggin@gmail.com
arch/powerpc/kernel/exceptions-64s.S

index 3322000..a42b73e 100644 (file)
@@ -939,13 +939,13 @@ EXC_COMMON_BEGIN(system_reset_common)
         * the right thing. We do not want to reconcile because that goes
         * 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.
         */
        li      r10,IRQS_ALL_DISABLED
        stb     r10,PACAIRQSOFTMASK(r13)
        lbz     r10,PACAIRQHAPPENED(r13)
-       std     r10,_DAR(r1)
+       std     r10,RESULT(r1)
        ori     r10,r10,PACA_IRQ_HARD_DIS
        stb     r10,PACAIRQHAPPENED(r13)
 
@@ -966,7 +966,7 @@ EXC_COMMON_BEGIN(system_reset_common)
        /*
         * Restore soft mask settings.
         */
-       ld      r10,_DAR(r1)
+       ld      r10,RESULT(r1)
        stb     r10,PACAIRQHAPPENED(r13)
        ld      r10,SOFTE(r1)
        stb     r10,PACAIRQSOFTMASK(r13)
@@ -2743,7 +2743,7 @@ EXC_COMMON_BEGIN(soft_nmi_common)
        li      r10,IRQS_ALL_DISABLED
        stb     r10,PACAIRQSOFTMASK(r13)
        lbz     r10,PACAIRQHAPPENED(r13)
-       std     r10,_DAR(r1)
+       std     r10,RESULT(r1)
        ori     r10,r10,PACA_IRQ_HARD_DIS
        stb     r10,PACAIRQHAPPENED(r13)
 
@@ -2757,7 +2757,7 @@ EXC_COMMON_BEGIN(soft_nmi_common)
        /*
         * Restore soft mask settings.
         */
-       ld      r10,_DAR(r1)
+       ld      r10,RESULT(r1)
        stb     r10,PACAIRQHAPPENED(r13)
        ld      r10,SOFTE(r1)
        stb     r10,PACAIRQSOFTMASK(r13)