LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH/RFC 1/2] powerpc: BOOKE watchdog handler dump additional info
@ 2007-05-30  0:53 Dave Jiang
  0 siblings, 0 replies; only message in thread
From: Dave Jiang @ 2007-05-30  0:53 UTC (permalink / raw)
  To: galak; +Cc: linuxppc-dev, paulus

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@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)

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

only message in thread, other threads:[~2007-05-30  0:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-30  0:53 [PATCH/RFC 1/2] powerpc: BOOKE watchdog handler dump additional info Dave Jiang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox