Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 99806
b: refs/heads/master
c: 4b82b27
h: refs/heads/master
v: v3
  • Loading branch information
Cyrill Gorcunov authored and Thomas Gleixner committed May 25, 2008
1 parent d4e43c2 commit a6bc3f6
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d1b946b97d71423f365fa797d1428e1847c0bec1
refs/heads/master: 4b82b277707a39b97271439c475f186f63ec4692
19 changes: 13 additions & 6 deletions trunk/arch/x86/kernel/nmi_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,17 @@ static DEFINE_PER_CPU(short, wd_enabled);

static int endflag __initdata = 0;

/* Run after command line and cpu_init init, but before all other checks */
void nmi_watchdog_default(void)
{
if (nmi_watchdog != NMI_DEFAULT)
return;
if (lapic_watchdog_ok())
nmi_watchdog = NMI_LOCAL_APIC;
else
nmi_watchdog = NMI_IO_APIC;
}

#ifdef CONFIG_SMP
/* The performance counters used by NMI_LOCAL_APIC don't trigger when
* the CPU is idle. To make sure the NMI watchdog really ticks on all
Expand Down Expand Up @@ -437,12 +448,8 @@ int proc_nmi_enabled(struct ctl_table *table, int write, struct file *file,
return -EIO;
}

if (nmi_watchdog == NMI_DEFAULT) {
if (lapic_watchdog_ok())
nmi_watchdog = NMI_LOCAL_APIC;
else
nmi_watchdog = NMI_IO_APIC;
}
/* if nmi_watchdog is not set yet, then set it */
nmi_watchdog_default();

if (nmi_watchdog == NMI_LOCAL_APIC) {
if (nmi_watchdog_enabled)
Expand Down
4 changes: 1 addition & 3 deletions trunk/include/asm-x86/nmi.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,9 @@ static inline void unset_nmi_pm_callback(struct pm_dev *dev)

#ifdef CONFIG_X86_64
extern void default_do_nmi(struct pt_regs *);
extern void nmi_watchdog_default(void);
#else
#define nmi_watchdog_default() do {} while (0)
#endif

extern void nmi_watchdog_default(void);
extern void die_nmi(char *str, struct pt_regs *regs, int do_panic);
extern int check_nmi_watchdog(void);
extern int nmi_watchdog_enabled;
Expand Down

0 comments on commit a6bc3f6

Please sign in to comment.