linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc: Use WARN instead of dump_stack when printing EEH error backtrace
@ 2012-04-18  5:16 Anton Blanchard
  0 siblings, 0 replies; only message in thread
From: Anton Blanchard @ 2012-04-18  5:16 UTC (permalink / raw)
  To: benh, paulus, shangw, linuxppc-dev


When we get an EEH error we just print a backtrace with dump_stack
which is rather cryptic. We really should print something before
spewing out the backtrace.

Also switch from dump_stack to WARN so we get more information about
the fail - what modules were loaded, what process was running etc.
This was useful information when debugging a recent EEH subsystem bug.

The standard WARN output should also get picked up by monitoring
tools like kerneloops.

The register dump is of questionable value here but I figured it was
better to use something standard and not roll my own.

Signed-off-by: Anton Blanchard <anton@samba.org>
---

Index: linux-build/arch/powerpc/platforms/pseries/eeh.c
===================================================================
--- linux-build.orig/arch/powerpc/platforms/pseries/eeh.c	2012-04-13 10:29:53.576534339 +1000
+++ linux-build/arch/powerpc/platforms/pseries/eeh.c	2012-04-13 10:51:22.592822459 +1000
@@ -489,7 +489,7 @@ int eeh_dn_check_failure(struct device_n
 	 * a stack trace will help the device-driver authors figure
 	 * out what happened.  So print that out.
 	 */
-	dump_stack();
+	WARN(1, "EEH: failure detected\n");
 	return 1;
 
 dn_unlock:

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-04-18  5:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-18  5:16 [PATCH] powerpc: Use WARN instead of dump_stack when printing EEH error backtrace Anton Blanchard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).