]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
x86: nmi_32.c - add "panic" option
authorCyrill Gorcunov <gorcunov@gmail.com>
Sat, 24 May 2008 15:36:34 +0000 (19:36 +0400)
committerThomas Gleixner <tglx@linutronix.de>
Sun, 25 May 2008 20:32:50 +0000 (22:32 +0200)
Allow to pass "panic" option in 32bit mode

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: hpa@zytor.com
Cc: mingo@redhat.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
arch/x86/kernel/nmi_32.c

index bd04a28f7a5cfe1173bd35560fc596cd9f6e770b..4437fe1edabcbb565e556b4b1d3f5e407deddbe3 100644 (file)
@@ -42,6 +42,7 @@ static cpumask_t backtrace_mask = CPU_MASK_NONE;
  *  0: the lapic NMI watchdog is disabled, but can be enabled
  */
 atomic_t nmi_active = ATOMIC_INIT(0);          /* oprofile uses this */
+static int panic_on_timeout;
 
 unsigned int nmi_watchdog = NMI_DEFAULT;
 static unsigned int nmi_hz = HZ;
@@ -140,6 +141,14 @@ static int __init setup_nmi_watchdog(char *str)
 {
        int nmi;
 
+       if (!strncmp(str, "panic", 5)) {
+               panic_on_timeout = 1;
+               str = strchr(str, ',');
+               if (!str)
+                       return 1;
+               ++str;
+       }
+
        get_option(&str, &nmi);
 
        if ((nmi >= NMI_INVALID) || (nmi < NMI_NONE))
@@ -374,7 +383,7 @@ nmi_watchdog_tick(struct pt_regs *regs, unsigned reason)
                         * die_nmi will return ONLY if NOTIFY_STOP happens..
                         */
                        die_nmi("BUG: NMI Watchdog detected LOCKUP",
-                               regs, 0);
+                               regs, panic_on_timeout);
        } else {
                __get_cpu_var(last_irq_sum) = sum;
                local_set(&__get_cpu_var(alert_counter), 0);