Skip to contentSkip to conversation

powerpc: BOOKE watchdog handler dump additional info

PATCH New Dave Jiang 1 participant 1 message May 30, 2007 PowerPC

lore
Share & tools
lore

Dave Jiang

author
#0 lore raw

PATCH 1/2 powerpc: BOOKE watchdog handler dump additional info

Have the watchdog handler to call die(). This allows some system information such as registers, stack dump, and etc to be displayed. The die() handler should handle the situation appropriately (i.e. kill process, call panic, or call crash_kexec)

The follow on patch will address any issues in regards to watchdog following the call of panic.

We have to keep the watchdog interrupt enabled because die() can just kill a process and return the system to a running state instead of panic(). This will allow us to catch any new watchdog timeout exceptions if the system hangs again.

---

 traps.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
arch/powerpc/kernel/traps.c +1 -2
index bf6445a..837f742 100644
@@ -1095,8 +1095,7 @@ void unrecoverable_exception(struct pt_regs *regs)
 void __attribute__ ((weak)) WatchdogHandler(struct pt_regs *regs)
 {
 	/* Generic WatchdogHandler, implement your own */
-	mtspr(SPRN_TCR, mfspr(SPRN_TCR)&(~TCR_WIE));
-	return;
+	die("PowerPC Book-E Watchdog Exception", regs, SIGSEGV);
 }
 
 void WatchdogException(struct pt_regs *regs)