Browse Source

powerpc/64s: Fix OPAL_CALL non-maskable interrupt reentrancy

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>
Nicholas Piggin 8 years ago
parent
commit
c07e1b8a27
1 changed files with 3 additions and 3 deletions
  1. 3 3
      arch/powerpc/platforms/powernv/opal-wrappers.S

+ 3 - 3
arch/powerpc/platforms/powernv/opal-wrappers.S

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