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

Dave Jiang djiang at mvista.com
Wed May 30 10:53:36 EST 2007


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.

Signed-off-by: Dave Jiang <djiang at mvista.com>

---

 traps.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
index bf6445a..837f742 100644
--- a/arch/powerpc/kernel/traps.c
+++ b/arch/powerpc/kernel/traps.c
@@ -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)



More information about the Linuxppc-dev mailing list