]> err.no Git - linux-2.6/commitdiff
[IA64] support panic_on_oops sysctl
authorHorms <horms@verge.net.au>
Wed, 15 Feb 2006 08:23:09 +0000 (17:23 +0900)
committerTony Luck <tony.luck@intel.com>
Wed, 15 Feb 2006 23:16:50 +0000 (15:16 -0800)
Trivial port of this feature from i386
As it stands, panic_on_oops but does nothing on ia64

Signed-Off-By: Horms <horms@verge.net.au>
Signed-off-by: Tony Luck <tony.luck@intel.com>
arch/ia64/kernel/traps.c

index 55391901b0137f17184a7e8203d5087581ecd14e..dabd6c32641ecc412d81d35f423813c3c72aa4b3 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/module.h>       /* for EXPORT_SYMBOL */
 #include <linux/hardirq.h>
 #include <linux/kprobes.h>
+#include <linux/delay.h>               /* for ssleep() */
 
 #include <asm/fpswa.h>
 #include <asm/ia32.h>
@@ -116,6 +117,13 @@ die (const char *str, struct pt_regs *regs, long err)
        bust_spinlocks(0);
        die.lock_owner = -1;
        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);
 }