Disable NMI watchdog by default properly
This reverts commit 6ebf622b25
and
replaces it with one that actually works.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
hifive-unleashed-5.1
parent
4e337adae4
commit
8ce5e3e45e
|
@ -245,14 +245,6 @@ static int __init check_nmi_watchdog(void)
|
||||||
unsigned int *prev_nmi_count;
|
unsigned int *prev_nmi_count;
|
||||||
int cpu;
|
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))
|
if ((nmi_watchdog == NMI_NONE) || (nmi_watchdog == NMI_DEFAULT))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|
|
@ -187,10 +187,7 @@ void nmi_watchdog_default(void)
|
||||||
{
|
{
|
||||||
if (nmi_watchdog != NMI_DEFAULT)
|
if (nmi_watchdog != NMI_DEFAULT)
|
||||||
return;
|
return;
|
||||||
if (nmi_known_cpu())
|
nmi_watchdog = NMI_NONE;
|
||||||
nmi_watchdog = NMI_LOCAL_APIC;
|
|
||||||
else
|
|
||||||
nmi_watchdog = NMI_IO_APIC;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int endflag __initdata = 0;
|
static int endflag __initdata = 0;
|
||||||
|
|
|
@ -33,7 +33,7 @@ extern int nmi_watchdog_tick (struct pt_regs * regs, unsigned reason);
|
||||||
|
|
||||||
extern atomic_t nmi_active;
|
extern atomic_t nmi_active;
|
||||||
extern unsigned int nmi_watchdog;
|
extern unsigned int nmi_watchdog;
|
||||||
#define NMI_DEFAULT 0
|
#define NMI_DEFAULT -1
|
||||||
#define NMI_NONE 0
|
#define NMI_NONE 0
|
||||||
#define NMI_IO_APIC 1
|
#define NMI_IO_APIC 1
|
||||||
#define NMI_LOCAL_APIC 2
|
#define NMI_LOCAL_APIC 2
|
||||||
|
|
|
@ -64,7 +64,7 @@ extern int setup_nmi_watchdog(char *);
|
||||||
|
|
||||||
extern atomic_t nmi_active;
|
extern atomic_t nmi_active;
|
||||||
extern unsigned int nmi_watchdog;
|
extern unsigned int nmi_watchdog;
|
||||||
#define NMI_DEFAULT 0
|
#define NMI_DEFAULT -1
|
||||||
#define NMI_NONE 0
|
#define NMI_NONE 0
|
||||||
#define NMI_IO_APIC 1
|
#define NMI_IO_APIC 1
|
||||||
#define NMI_LOCAL_APIC 2
|
#define NMI_LOCAL_APIC 2
|
||||||
|
|
Loading…
Reference in New Issue