From: Russell King Date: Sun, 19 Feb 2006 19:53:56 +0000 (+0000) Subject: [ARM] Add panic-on-oops support X-Git-Tag: v2.6.16-rc5~60^2~9 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=31867499b21b2374eb0cc6b3d1ea6b4ade4d1cc2;p=linux-2.6-omap-h63xx.git [ARM] Add panic-on-oops support Although you could ask the kernel for panic-on-oops, it remained non-functional because the architecture specific code fragment had not been implemented. Add it, so it works as advertised. Signed-off-by: Russell King --- diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c index 10235b01582..03924bcc612 100644 --- a/arch/arm/kernel/traps.c +++ b/arch/arm/kernel/traps.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include @@ -231,6 +232,13 @@ NORET_TYPE void die(const char *str, struct pt_regs *regs, int err) __die(str, err, thread, regs); bust_spinlocks(0); spin_unlock_irq(&die_lock); + + if (panic_on_oops) { + printk(KERN_EMERG "Fatal exception: panic in 5 seconds\n"); + ssleep(5); + panic("Fatal exception"); + } + do_exit(SIGSEGV); }