Thread (35 messages) flat view 35 messages, 7 authors, 2007-11-28

Re: [RFC/PATCH 5/14] powerpc: Fix 440/440A machine check handling

From: Josh Boyer <hidden>
Date: 2007-11-21 13:12:48

On Wed, 21 Nov 2007 17:16:24 +1100
Benjamin Herrenschmidt [off-list ref] wrote:
This removes CONFIG_440A which was a problem for multiplatform
kernels and instead fixes up the IVOR at runtime from a setup_cpu
function. The "A" version of the machine check also tweaks the
regs->trap value to differenciate the 2 versions at the C level.
<snip>
quoted hunk ↗ jump to hunk
 void machine_check_exception(struct pt_regs *regs)
 {
@@ -463,8 +489,20 @@ void machine_check_exception(struct pt_r
 	/* See if any machine dependent calls */
 	if (ppc_md.machine_check_exception)
 		recover = ppc_md.machine_check_exception(regs);
-	else
-		recover = generic_machine_check_exception(regs);
+	else {
+#ifdef CONFIG_4xx
+		if (IS_MCHECK_EXC(regs))
+			recover = decode_machine_check_4xxA(regs);
+		else
+			recover = decode_machine_check_4xx(regs);
+#elif defined (CONFIG_E500)
+		recover = decode_machine_check_e500(regs);
+#elif defined (CONFIG_E200)
+		recover = decode_machine_check_e200(regs);
+#else
+		recover = decode_machine_check_generic(regs);
+#endif
Why didn't you just add a ppc_md.machine_check_exception to the
effected boards?  Then you could have gotten rid of the ifdefs all
together.

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