diff mbox

[1/2] powerpc/pseries: PACA save area fix for general exception vs MCE

Message ID 1470826123-14699-2-git-send-email-npiggin@gmail.com (mailing list archive)
State Accepted
Delegated to: Benjamin Herrenschmidt
Headers show

Commit Message

Nicholas Piggin Aug. 10, 2016, 10:48 a.m. UTC
MCE must not use PACA_EXGEN. When a general exception enables MSR_RI,
that means SPRN_SRR[01] and SPRN_SPRG are no longer used. However the
PACA save area is still in use.
---
 arch/powerpc/kernel/exceptions-64s.S | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Mahesh J Salgaonkar Aug. 11, 2016, 6:45 a.m. UTC | #1
On 08/10/2016 04:18 PM, Nicholas Piggin wrote:
> MCE must not use PACA_EXGEN. When a general exception enables MSR_RI,
> that means SPRN_SRR[01] and SPRN_SPRG are no longer used. However the
> PACA save area is still in use.
> ---
>  arch/powerpc/kernel/exceptions-64s.S | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S
> index 694def6..4174c4e 100644
> --- a/arch/powerpc/kernel/exceptions-64s.S
> +++ b/arch/powerpc/kernel/exceptions-64s.S
> @@ -984,14 +984,14 @@ ALT_MMU_FTR_SECTION_END_IFCLR(MMU_FTR_RADIX)
>  machine_check_common:
> 
>  	mfspr	r10,SPRN_DAR
> -	std	r10,PACA_EXGEN+EX_DAR(r13)
> +	std	r10,PACA_EXMC+EX_DAR(r13)
>  	mfspr	r10,SPRN_DSISR
> -	stw	r10,PACA_EXGEN+EX_DSISR(r13)
> +	stw	r10,PACA_EXMC+EX_DSISR(r13)
>  	EXCEPTION_PROLOG_COMMON(0x200, PACA_EXMC)
>  	FINISH_NAP
>  	RECONCILE_IRQ_STATE(r10, r11)
> -	ld	r3,PACA_EXGEN+EX_DAR(r13)
> -	lwz	r4,PACA_EXGEN+EX_DSISR(r13)
> +	ld	r3,PACA_EXMC+EX_DAR(r13)
> +	lwz	r4,PACA_EXMC+EX_DSISR(r13)
>  	std	r3,_DAR(r1)
>  	std	r4,_DSISR(r1)
>  	bl	save_nvgprs
> 

Yup agree. Looks like copy-paste was the culprit.

Acked-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
diff mbox

Patch

diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S
index 694def6..4174c4e 100644
--- a/arch/powerpc/kernel/exceptions-64s.S
+++ b/arch/powerpc/kernel/exceptions-64s.S
@@ -984,14 +984,14 @@  ALT_MMU_FTR_SECTION_END_IFCLR(MMU_FTR_RADIX)
 machine_check_common:
 
 	mfspr	r10,SPRN_DAR
-	std	r10,PACA_EXGEN+EX_DAR(r13)
+	std	r10,PACA_EXMC+EX_DAR(r13)
 	mfspr	r10,SPRN_DSISR
-	stw	r10,PACA_EXGEN+EX_DSISR(r13)
+	stw	r10,PACA_EXMC+EX_DSISR(r13)
 	EXCEPTION_PROLOG_COMMON(0x200, PACA_EXMC)
 	FINISH_NAP
 	RECONCILE_IRQ_STATE(r10, r11)
-	ld	r3,PACA_EXGEN+EX_DAR(r13)
-	lwz	r4,PACA_EXGEN+EX_DSISR(r13)
+	ld	r3,PACA_EXMC+EX_DAR(r13)
+	lwz	r4,PACA_EXMC+EX_DSISR(r13)
 	std	r3,_DAR(r1)
 	std	r4,_DSISR(r1)
 	bl	save_nvgprs