aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386/kernel/nmi.c
diff options
context:
space:
mode:
authorDaniel Gollub <dgollub@suse.de>2007-08-14 20:40:35 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-08-18 13:25:25 -0400
commit0328ecef9041fe477efc2404fd3aaa29e7ee0430 (patch)
tree10384b404a1052df528d947e6c2269f10b3b4712 /arch/i386/kernel/nmi.c
parent8154549cb8ca795cbefda404cd6120398e5b145f (diff)
x86_64: Fix to keep watchdog disabled by default for i386/x86_64
Fixed wrong expression which enabled watchdogs even if nmi_watchdog kernel parameter wasn't set. This regression got slightly introduced with commit b7471c6da94d30d3deadc55986cc38d1ff57f9ca. Introduced NMI_DISABLED (-1) which allows to switch the value of NMI_DEFAULT without breaking the APIC NMI watchdog code (again). Fixes: https://bugzilla.novell.com/show_bug.cgi?id=298084 http://bugzilla.kernel.org/show_bug.cgi?id=7839 And likely some more nmi_watchdog=0 related issues. Signed-off-by: Daniel Gollub <dgollub@suse.de> Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/i386/kernel/nmi.c')
-rw-r--r--arch/i386/kernel/nmi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/i386/kernel/nmi.c b/arch/i386/kernel/nmi.c
index 99beac7f96ce..8c1c965eb2a8 100644
--- a/arch/i386/kernel/nmi.c
+++ b/arch/i386/kernel/nmi.c
@@ -77,7 +77,7 @@ static int __init check_nmi_watchdog(void)
77 unsigned int *prev_nmi_count; 77 unsigned int *prev_nmi_count;
78 int cpu; 78 int cpu;
79 79
80 if ((nmi_watchdog == NMI_NONE) || (nmi_watchdog == NMI_DEFAULT)) 80 if ((nmi_watchdog == NMI_NONE) || (nmi_watchdog == NMI_DISABLED))
81 return 0; 81 return 0;
82 82
83 if (!atomic_read(&nmi_active)) 83 if (!atomic_read(&nmi_active))
@@ -424,7 +424,7 @@ int proc_nmi_enabled(struct ctl_table *table, int write, struct file *file,
424 if (!!old_state == !!nmi_watchdog_enabled) 424 if (!!old_state == !!nmi_watchdog_enabled)
425 return 0; 425 return 0;
426 426
427 if (atomic_read(&nmi_active) < 0) { 427 if (atomic_read(&nmi_active) < 0 || nmi_watchdog == NMI_DISABLED) {
428 printk( KERN_WARNING "NMI watchdog is permanently disabled\n"); 428 printk( KERN_WARNING "NMI watchdog is permanently disabled\n");
429 return -EIO; 429 return -EIO;
430 } 430 }