diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-03-14 20:50:48 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-03-14 20:53:43 -0400 |
commit | 8ce5e3e45e01ffab38a9f03900181132b9068543 (patch) | |
tree | 87dbcacd8a6279d3bea2699448bca63f12d7e9c9 | |
parent | 4e337adae4e960f64043b9f433c4a825c902616c (diff) |
Disable NMI watchdog by default properly
This reverts commit 6ebf622b2577c50b1f496bd6a5e8739e55ae7b1c and
replaces it with one that actually works.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | arch/i386/kernel/nmi.c | 8 | ||||
-rw-r--r-- | arch/x86_64/kernel/nmi.c | 5 | ||||
-rw-r--r-- | include/asm-i386/nmi.h | 2 | ||||
-rw-r--r-- | include/asm-x86_64/nmi.h | 2 |
4 files changed, 3 insertions, 14 deletions
diff --git a/arch/i386/kernel/nmi.c b/arch/i386/kernel/nmi.c index 821df34d2b3a..14702427b104 100644 --- a/arch/i386/kernel/nmi.c +++ b/arch/i386/kernel/nmi.c | |||
@@ -245,14 +245,6 @@ static int __init check_nmi_watchdog(void) | |||
245 | unsigned int *prev_nmi_count; | 245 | unsigned int *prev_nmi_count; |
246 | int cpu; | 246 | int cpu; |
247 | 247 | ||
248 | /* Enable NMI watchdog for newer systems. | ||
249 | Probably safe on most older systems too, but let's be careful. | ||
250 | IBM ThinkPads use INT10 inside SMM and that allows early NMI inside SMM | ||
251 | which hangs the system. Disable watchdog for all thinkpads */ | ||
252 | if (nmi_watchdog == NMI_DEFAULT && dmi_get_year(DMI_BIOS_DATE) >= 2004 && | ||
253 | !dmi_name_in_vendors("ThinkPad")) | ||
254 | nmi_watchdog = NMI_LOCAL_APIC; | ||
255 | |||
256 | if ((nmi_watchdog == NMI_NONE) || (nmi_watchdog == NMI_DEFAULT)) | 248 | if ((nmi_watchdog == NMI_NONE) || (nmi_watchdog == NMI_DEFAULT)) |
257 | return 0; | 249 | return 0; |
258 | 250 | ||
diff --git a/arch/x86_64/kernel/nmi.c b/arch/x86_64/kernel/nmi.c index 486f4c61a948..82d9d85d5270 100644 --- a/arch/x86_64/kernel/nmi.c +++ b/arch/x86_64/kernel/nmi.c | |||
@@ -187,10 +187,7 @@ void nmi_watchdog_default(void) | |||
187 | { | 187 | { |
188 | if (nmi_watchdog != NMI_DEFAULT) | 188 | if (nmi_watchdog != NMI_DEFAULT) |
189 | return; | 189 | return; |
190 | if (nmi_known_cpu()) | 190 | nmi_watchdog = NMI_NONE; |
191 | nmi_watchdog = NMI_LOCAL_APIC; | ||
192 | else | ||
193 | nmi_watchdog = NMI_IO_APIC; | ||
194 | } | 191 | } |
195 | 192 | ||
196 | static int endflag __initdata = 0; | 193 | static int endflag __initdata = 0; |
diff --git a/include/asm-i386/nmi.h b/include/asm-i386/nmi.h index 64544cb85d6a..b04333ea6f31 100644 --- a/include/asm-i386/nmi.h +++ b/include/asm-i386/nmi.h | |||
@@ -33,7 +33,7 @@ extern int nmi_watchdog_tick (struct pt_regs * regs, unsigned reason); | |||
33 | 33 | ||
34 | extern atomic_t nmi_active; | 34 | extern atomic_t nmi_active; |
35 | extern unsigned int nmi_watchdog; | 35 | extern unsigned int nmi_watchdog; |
36 | #define NMI_DEFAULT 0 | 36 | #define NMI_DEFAULT -1 |
37 | #define NMI_NONE 0 | 37 | #define NMI_NONE 0 |
38 | #define NMI_IO_APIC 1 | 38 | #define NMI_IO_APIC 1 |
39 | #define NMI_LOCAL_APIC 2 | 39 | #define NMI_LOCAL_APIC 2 |
diff --git a/include/asm-x86_64/nmi.h b/include/asm-x86_64/nmi.h index ceb3d8dac33d..72375e7d32a8 100644 --- a/include/asm-x86_64/nmi.h +++ b/include/asm-x86_64/nmi.h | |||
@@ -64,7 +64,7 @@ extern int setup_nmi_watchdog(char *); | |||
64 | 64 | ||
65 | extern atomic_t nmi_active; | 65 | extern atomic_t nmi_active; |
66 | extern unsigned int nmi_watchdog; | 66 | extern unsigned int nmi_watchdog; |
67 | #define NMI_DEFAULT 0 | 67 | #define NMI_DEFAULT -1 |
68 | #define NMI_NONE 0 | 68 | #define NMI_NONE 0 |
69 | #define NMI_IO_APIC 1 | 69 | #define NMI_IO_APIC 1 |
70 | #define NMI_LOCAL_APIC 2 | 70 | #define NMI_LOCAL_APIC 2 |