Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 99813
b: refs/heads/master
c: 19ec673
h: refs/heads/master
i:
  99811: aaa0e3c
v: v3
  • Loading branch information
Cyrill Gorcunov authored and Ingo Molnar committed May 28, 2008
1 parent d7eb4ea commit 7a60731
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 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: 1798bc22b2790bf2a956588e6b17c36ef79ceff7
refs/heads/master: 19ec673ced067316b9732bc6d1c4ff4052e5f795
16 changes: 9 additions & 7 deletions trunk/arch/x86/kernel/nmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,20 +84,15 @@ static inline unsigned int get_timer_irqs(int cpu)
#endif
}

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

#ifdef CONFIG_SMP
/*
Expand Down Expand Up @@ -488,8 +483,15 @@ int proc_nmi_enabled(struct ctl_table *table, int write, struct file *file,
return -EIO;
}

#ifdef CONFIG_X86_64
/* if nmi_watchdog is not set yet, then set it */
nmi_watchdog_default();
#else
if (lapic_watchdog_ok())
nmi_watchdog = NMI_LOCAL_APIC;
else
nmi_watchdog = NMI_IO_APIC;
#endif

if (nmi_watchdog == NMI_LOCAL_APIC) {
if (nmi_watchdog_enabled)
Expand Down
4 changes: 3 additions & 1 deletion trunk/include/asm-x86/nmi.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,11 @@ 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(void) 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 7a60731

Please sign in to comment.