]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
powerpc/64s: Fix OPAL_CALL non-maskable interrupt reentrancy
authorNicholas Piggin <npiggin@gmail.com>
Mon, 1 May 2017 12:01:10 +0000 (22:01 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 30 May 2017 04:59:51 +0000 (14:59 +1000)
OPAL_CALL uses SRR[01] with MSR_RI=1, which gets corrupted if there
is an interleaving system reset or machine check interrupt.

Use HSRR[01] instead, which does not require MSR_RI=0.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/platforms/powernv/opal-wrappers.S

index f620572f891f4ffdde6702f400158383bba5dd59..4ca6c26a56d5cd2c2ef5fcbe0fda2c034b9dae3d 100644 (file)
@@ -99,10 +99,10 @@ opal_return:
        lwz     r4,8(r1);
        ld      r5,PPC_LR_STKOFF(r1);
        ld      r6,PACASAVEDMSR(r13);
-       mtspr   SPRN_SRR0,r5;
-       mtspr   SPRN_SRR1,r6;
        mtcr    r4;
-       rfid
+       mtspr   SPRN_HSRR0,r5;
+       mtspr   SPRN_HSRR1,r6;
+       hrfid
 
 opal_real_call:
        mfcr    r11