diff options
author | Andi Kleen <ak@suse.de> | 2006-09-26 10:52:27 +0200 |
---|---|---|
committer | Andi Kleen <andi@basil.nowhere.org> | 2006-09-26 10:52:27 +0200 |
commit | 1de84979dfc527c422abf63f27beabe43892989b (patch) | |
tree | 4cf32ce7c374118c04edca7bfdff25e187da63d2 /arch | |
parent | 260d6790b6a2a0a048b7f96d154c2b49f1e6515a (diff) | |
download | op-kernel-dev-1de84979dfc527c422abf63f27beabe43892989b.zip op-kernel-dev-1de84979dfc527c422abf63f27beabe43892989b.tar.gz |
[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>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/i386/kernel/nmi.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/i386/kernel/nmi.c b/arch/i386/kernel/nmi.c index 8e4ed93..6e5085d 100644 --- a/arch/i386/kernel/nmi.c +++ b/arch/i386/kernel/nmi.c @@ -21,6 +21,7 @@ #include <linux/sysdev.h> #include <linux/sysctl.h> #include <linux/percpu.h> +#include <linux/dmi.h> #include <asm/smp.h> #include <asm/nmi.h> @@ -204,6 +205,14 @@ static int __init check_nmi_watchdog(void) unsigned int *prev_nmi_count; int cpu; + /* Enable NMI watchdog for newer systems. + Actually it should be safe for most systems before 2004 too except + for some IBM systems that corrupt registers when NMI happens + during SMM. Unfortunately we don't have more exact information + on these and use this coarse check. */ + if (nmi_watchdog == NMI_DEFAULT && dmi_get_year(DMI_BIOS_DATE) >= 2004) + nmi_watchdog = NMI_LOCAL_APIC; + if ((nmi_watchdog == NMI_NONE) || (nmi_watchdog == NMI_DEFAULT)) return 0; |