aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndi Kleen <ak@suse.de>2006-09-26 04:52:27 -0400
committerAndi Kleen <andi@basil.nowhere.org>2006-09-26 04:52:27 -0400
commit1de84979dfc527c422abf63f27beabe43892989b (patch)
tree4cf32ce7c374118c04edca7bfdff25e187da63d2
parent260d6790b6a2a0a048b7f96d154c2b49f1e6515a (diff)
[PATCH] i386: Enable NMI watchdog by default
I've had good experiences with having this on by default on x86-64. It turns nasty hangs into easier to debug oopses. Enable the local APIC wdog by default for systems newer than 2004. This comes from a strange compromise: according to arjan the reason it was off by default was some old IBM systems that corrupted registered when NMI happened in SMI. Can't remember more specific, but >= 2004 should avoid these. It's probably overly broad because most older systems should be ok (and the really old systems won't be supported by the local apic watchdog anyways) Signed-off-by: Andi Kleen <ak@suse.de>
-rw-r--r--arch/i386/kernel/nmi.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/i386/kernel/nmi.c b/arch/i386/kernel/nmi.c
index 8e4ed930ce6b..6e5085d5d2f6 100644
--- a/arch/i386/kernel/nmi.c
+++ b/arch/i386/kernel/nmi.c
@@ -21,6 +21,7 @@
21#include <linux/sysdev.h> 21#include <linux/sysdev.h>
22#include <linux/sysctl.h> 22#include <linux/sysctl.h>
23#include <linux/percpu.h> 23#include <linux/percpu.h>
24#include <linux/dmi.h>
24 25
25#include <asm/smp.h> 26#include <asm/smp.h>
26#include <asm/nmi.h> 27#include <asm/nmi.h>
@@ -204,6 +205,14 @@ static int __init check_nmi_watchdog(void)
204 unsigned int *prev_nmi_count; 205 unsigned int *prev_nmi_count;
205 int cpu; 206 int cpu;
206 207
208 /* Enable NMI watchdog for newer systems.
209 Actually it should be safe for most systems before 2004 too except
210 for some IBM systems that corrupt registers when NMI happens
211 during SMM. Unfortunately we don't have more exact information
212 on these and use this coarse check. */
213 if (nmi_watchdog == NMI_DEFAULT && dmi_get_year(DMI_BIOS_DATE) >= 2004)
214 nmi_watchdog = NMI_LOCAL_APIC;
215
207 if ((nmi_watchdog == NMI_NONE) || (nmi_watchdog == NMI_DEFAULT)) 216 if ((nmi_watchdog == NMI_NONE) || (nmi_watchdog == NMI_DEFAULT))
208 return 0; 217 return 0;
209 218