Thread (7 messages) 7 messages, 4 authors, 2010-11-11

Re: [PATCH 3/4][v2] fsl_rio: move machine_check handler into machine_check_e500 & machine_check_e500mc

From: Kumar Gala <hidden>
Date: 2010-11-11 12:27:03
Also in: lkml

On Nov 11, 2010, at 4:19 AM, Xie Shaohui-B21989 wrote:
=20
=20
=20
Best Regards,=20
Shaohui Xie=20
=20
=20
quoted
-----Original Message-----
From: Bounine, Alexandre [mailto:Alexandre.Bounine@idt.com]
Sent: Thursday, November 11, 2010 6:55 AM
To: Xie Shaohui-B21989; akpm@linux-foundation.org
Cc: linux-kernel@vger.kernel.org; linuxppc-dev@lists.ozlabs.org; Li
Yang-
quoted
R58472; Gala Kumar-B11780; Zang Roy-R61911
Subject: RE: [PATCH 3/4][v2] fsl_rio: move machine_check handler into
machine_check_e500 & machine_check_e500mc
=20
Shaohui Xie [off-list ref] wrote:
quoted
=20
diff --git a/arch/powerpc/kernel/traps.c
b/arch/powerpc/kernel/traps.c
quoted
quoted
index a45a63c..2a5fb9d 100644
--- a/arch/powerpc/kernel/traps.c
+++ b/arch/powerpc/kernel/traps.c
@@ -55,6 +55,7 @@
#endif
#include <asm/kexec.h>
#include <asm/ppc-opcode.h>
+#include <linux/rio.h>
=20
#if defined(CONFIG_DEBUGGER) || defined(CONFIG_KEXEC)  int
(*__debugger)(struct pt_regs *regs) __read_mostly; @@ -500,6 +501,13
@@ int machine_check_e500mc(struct pt_regs *regs)
		       reason & MCSR_MEA ? "Effective" : "Physical",
addr);
quoted
	}
=20
+	if (reason & MCSR_BUS_RBERR) {
+		printk("Bus - Read Data Bus Error\n"); #ifdef
CONFIG_RAPIDIO
quoted
quoted
+		recoverable =3D fsl_rio_mcheck_exception(regs); #endif
+	}
+
	mtspr(SPRN_MCSR, mcsr);
	return mfspr(SPRN_MCSR) =3D=3D 0 && recoverable;  } @@ -527,8
+535,12
quoted
@@
quoted
int machine_check_e500(struct pt_regs *regs)
		printk("Bus - Write Address Error\n");
	if (reason & MCSR_BUS_IBERR)
		printk("Bus - Instruction Data Error\n");
-	if (reason & MCSR_BUS_RBERR)
+	if (reason & MCSR_BUS_RBERR) {
		printk("Bus - Read Data Bus Error\n");
+#ifdef CONFIG_RAPIDIO
+		fsl_rio_mcheck_exception(regs);
+#endif
+	}
	if (reason & MCSR_BUS_WBERR)
		printk("Bus - Read Data Bus Error\n");
	if (reason & MCSR_BUS_IPERR)
=20
This implementation breaks an intended use of
fsl_rio_mcheck_exception():
1. for e500 it does not check the return value of the rio handler and
crashes the system even after RIO Mchk was serviced. Looks like =
e500mc
quoted
version handles it better but I have no HW to test it.
2. the RIO Mchk is expected to be handled quietly but here it has =
many
quoted
printk's. May be it is better to call the fsl_rio_mcheck_exception()
handler in very beginning and simply exit if it returns 1.
=20
Alex.
[Xie Shaohui-B21989] Hi Alex, seems your suggestion is some kind of
conflict with Kumar, you can have a look at=20
http://patchwork.ozlabs.org/patch/67774/
I think Alex's comment is the fact we ignore the 'return' value in the =
machine_check_e500 case.

- k=
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help