aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@gmail.com>2008-05-24 11:36:34 -0400
committerThomas Gleixner <tglx@linutronix.de>2008-05-25 16:32:50 -0400
commitd1b946b97d71423f365fa797d1428e1847c0bec1 (patch)
tree50774bfa6d77cc855bbf793dad6d5c7eefc2875a /arch
parentc6425b9f143a75bbcd0a7684b4df40e20d0b2f32 (diff)
x86: nmi_32.c - add "panic" option
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>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kernel/nmi_32.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/arch/x86/kernel/nmi_32.c b/arch/x86/kernel/nmi_32.c
index bd04a28f7a5c..4437fe1edabc 100644
--- a/arch/x86/kernel/nmi_32.c
+++ b/arch/x86/kernel/nmi_32.c
@@ -42,6 +42,7 @@ static cpumask_t backtrace_mask = CPU_MASK_NONE;
42 * 0: the lapic NMI watchdog is disabled, but can be enabled 42 * 0: the lapic NMI watchdog is disabled, but can be enabled
43 */ 43 */
44atomic_t nmi_active = ATOMIC_INIT(0); /* oprofile uses this */ 44atomic_t nmi_active = ATOMIC_INIT(0); /* oprofile uses this */
45static int panic_on_timeout;
45 46
46unsigned int nmi_watchdog = NMI_DEFAULT; 47unsigned int nmi_watchdog = NMI_DEFAULT;
47static unsigned int nmi_hz = HZ; 48static unsigned int nmi_hz = HZ;
@@ -140,6 +141,14 @@ static int __init setup_nmi_watchdog(char *str)
140{ 141{
141 int nmi; 142 int nmi;
142 143
144 if (!strncmp(str, "panic", 5)) {
145 panic_on_timeout = 1;
146 str = strchr(str, ',');
147 if (!str)
148 return 1;
149 ++str;
150 }
151
143 get_option(&str, &nmi); 152 get_option(&str, &nmi);
144 153
145 if ((nmi >= NMI_INVALID) || (nmi < NMI_NONE)) 154 if ((nmi >= NMI_INVALID) || (nmi < NMI_NONE))
@@ -374,7 +383,7 @@ nmi_watchdog_tick(struct pt_regs *regs, unsigned reason)
374 * die_nmi will return ONLY if NOTIFY_STOP happens.. 383 * die_nmi will return ONLY if NOTIFY_STOP happens..
375 */ 384 */
376 die_nmi("BUG: NMI Watchdog detected LOCKUP", 385 die_nmi("BUG: NMI Watchdog detected LOCKUP",
377 regs, 0); 386 regs, panic_on_timeout);
378 } else { 387 } else {
379 __get_cpu_var(last_irq_sum) = sum; 388 __get_cpu_var(last_irq_sum) = sum;
380 local_set(&__get_cpu_var(alert_counter), 0); 389 local_set(&__get_cpu_var(alert_counter), 0);