diff options
author | Cyrill Gorcunov <gorcunov@gmail.com> | 2008-05-28 15:00:47 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-05-28 15:04:53 -0400 |
commit | 19ec673ced067316b9732bc6d1c4ff4052e5f795 (patch) | |
tree | a56edc84896f6750078fe9ce259c35d529f73c80 /arch | |
parent | 1798bc22b2790bf2a956588e6b17c36ef79ceff7 (diff) |
x86: nmi - fix incorrect NMI watchdog used by default
The commit
commit 4b82b277707a39b97271439c475f186f63ec4692
Author: Cyrill Gorcunov <gorcunov@gmail.com>
Date: Sat May 24 19:36:35 2008 +0400
set nmi_watchdog to NMI_IO_APIC as by default. This causes hangs on some
machines with buggy watchdogs. Fix it - i.e. restore old behaviour.
Thanks to Sitsofe Wheeler and Adrian Bunk for catching the problem
and Maciej W. Rozycki for explanation what is going on there.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
CC: Maciej W. Rozycki <macro@linux-mips.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kernel/nmi.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/arch/x86/kernel/nmi.c b/arch/x86/kernel/nmi.c index 69a839fc1eb0..3671a9f3564b 100644 --- a/arch/x86/kernel/nmi.c +++ b/arch/x86/kernel/nmi.c | |||
@@ -84,20 +84,15 @@ static inline unsigned int get_timer_irqs(int cpu) | |||
84 | #endif | 84 | #endif |
85 | } | 85 | } |
86 | 86 | ||
87 | #ifdef CONFIG_X86_64 | ||
87 | /* Run after command line and cpu_init init, but before all other checks */ | 88 | /* Run after command line and cpu_init init, but before all other checks */ |
88 | void nmi_watchdog_default(void) | 89 | void nmi_watchdog_default(void) |
89 | { | 90 | { |
90 | if (nmi_watchdog != NMI_DEFAULT) | 91 | if (nmi_watchdog != NMI_DEFAULT) |
91 | return; | 92 | return; |
92 | #ifdef CONFIG_X86_64 | ||
93 | nmi_watchdog = NMI_NONE; | 93 | nmi_watchdog = NMI_NONE; |
94 | #else | ||
95 | if (lapic_watchdog_ok()) | ||
96 | nmi_watchdog = NMI_LOCAL_APIC; | ||
97 | else | ||
98 | nmi_watchdog = NMI_IO_APIC; | ||
99 | #endif | ||
100 | } | 94 | } |
95 | #endif | ||
101 | 96 | ||
102 | #ifdef CONFIG_SMP | 97 | #ifdef CONFIG_SMP |
103 | /* | 98 | /* |
@@ -488,8 +483,15 @@ int proc_nmi_enabled(struct ctl_table *table, int write, struct file *file, | |||
488 | return -EIO; | 483 | return -EIO; |
489 | } | 484 | } |
490 | 485 | ||
486 | #ifdef CONFIG_X86_64 | ||
491 | /* if nmi_watchdog is not set yet, then set it */ | 487 | /* if nmi_watchdog is not set yet, then set it */ |
492 | nmi_watchdog_default(); | 488 | nmi_watchdog_default(); |
489 | #else | ||
490 | if (lapic_watchdog_ok()) | ||
491 | nmi_watchdog = NMI_LOCAL_APIC; | ||
492 | else | ||
493 | nmi_watchdog = NMI_IO_APIC; | ||
494 | #endif | ||
493 | 495 | ||
494 | if (nmi_watchdog == NMI_LOCAL_APIC) { | 496 | if (nmi_watchdog == NMI_LOCAL_APIC) { |
495 | if (nmi_watchdog_enabled) | 497 | if (nmi_watchdog_enabled) |