Skip to contentSkip to conversation

Print backtrace in EEH code

PATCH New Anton Blanchard 1 participant 1 message Sep 1, 2004

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Print backtrace in EEH code

Hi,

We should print a stack backtrace when we get EEH errors, it makes debugging the cause of the fail easier.

Anton

===== eeh.c 1.29 vs edited =====

eeh.c renamed from arch/ppc64/kernel/eeh.c +6 -5
@@ -447,6 +447,10 @@
 
 		spin_unlock_irqrestore(&slot_errbuf_lock, flags);
 
+		printk(KERN_ERR "EEH: MMIO failure (%d) on device:%s %s\n",
+		       rets[0], pci_name(dev), pci_pretty_name(dev));
+		WARN_ON(1);
+
 		/*
 		 * XXX We should create a separate sysctl for this.
 		 *
@@ -454,14 +458,11 @@
 		 * the system in light of potential corruption, we
 		 * can use it here.
 		 */
-		if (panic_on_oops) {
+		if (panic_on_oops)
 			panic("EEH: MMIO failure (%d) on device:%s %s\n",
 			      rets[0], pci_name(dev), pci_pretty_name(dev));
-		} else {
+		else
 			__get_cpu_var(ignored_failures)++;
-			printk(KERN_INFO "EEH: MMIO failure (%d) on device:%s %s\n",
-			       rets[0], pci_name(dev), pci_pretty_name(dev));
-		}
 	} else {
 		__get_cpu_var(false_positives)++;
 	}