Skip to content

Commit

Permalink
Disable NMI watchdog by default properly
Browse files Browse the repository at this point in the history
This reverts commit 6ebf622 and
replaces it with one that actually works.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Linus Torvalds committed Mar 15, 2007
1 parent 4e337ad commit 8ce5e3e
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 14 deletions.
8 changes: 0 additions & 8 deletions arch/i386/kernel/nmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,14 +245,6 @@ static int __init check_nmi_watchdog(void)
unsigned int *prev_nmi_count;
int cpu;

/* Enable NMI watchdog for newer systems.
Probably safe on most older systems too, but let's be careful.
IBM ThinkPads use INT10 inside SMM and that allows early NMI inside SMM
which hangs the system. Disable watchdog for all thinkpads */
if (nmi_watchdog == NMI_DEFAULT && dmi_get_year(DMI_BIOS_DATE) >= 2004 &&
!dmi_name_in_vendors("ThinkPad"))
nmi_watchdog = NMI_LOCAL_APIC;

if ((nmi_watchdog == NMI_NONE) || (nmi_watchdog == NMI_DEFAULT))
return 0;

Expand Down
5 changes: 1 addition & 4 deletions arch/x86_64/kernel/nmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,7 @@ void nmi_watchdog_default(void)
{
if (nmi_watchdog != NMI_DEFAULT)
return;
if (nmi_known_cpu())
nmi_watchdog = NMI_LOCAL_APIC;
else
nmi_watchdog = NMI_IO_APIC;
nmi_watchdog = NMI_NONE;
}

static int endflag __initdata = 0;
Expand Down
2 changes: 1 addition & 1 deletion include/asm-i386/nmi.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ extern int nmi_watchdog_tick (struct pt_regs * regs, unsigned reason);

extern atomic_t nmi_active;
extern unsigned int nmi_watchdog;
#define NMI_DEFAULT 0
#define NMI_DEFAULT -1
#define NMI_NONE 0
#define NMI_IO_APIC 1
#define NMI_LOCAL_APIC 2
Expand Down
2 changes: 1 addition & 1 deletion include/asm-x86_64/nmi.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ extern int setup_nmi_watchdog(char *);

extern atomic_t nmi_active;
extern unsigned int nmi_watchdog;
#define NMI_DEFAULT 0
#define NMI_DEFAULT -1
#define NMI_NONE 0
#define NMI_IO_APIC 1
#define NMI_LOCAL_APIC 2
Expand Down

0 comments on commit 8ce5e3e

Please sign in to comment.