Commit b7471c6d authored by Don Zickus's avatar Don Zickus Committed by Andi Kleen

[PATCH] i386: Add SMP support on i386 to reservation framework

This patch includes the changes to make the nmi watchdog on i386 SMP aware.
A bunch of code was moved around to make it simpler to read.  In addition,
it is now possible to determine if a particular NMI was the result of the
watchdog or not.  This feature allows the kernel to filter out unknown NMIs
easier.
Signed-off-by: default avatarDon Zickus <dzickus@redhat.com>
Signed-off-by: default avatarAndi Kleen <ak@suse.de>
parent f2802e7f
...@@ -586,8 +586,7 @@ void __devinit setup_local_APIC(void) ...@@ -586,8 +586,7 @@ void __devinit setup_local_APIC(void)
printk("No ESR for 82489DX.\n"); printk("No ESR for 82489DX.\n");
} }
if (nmi_watchdog == NMI_LOCAL_APIC) setup_apic_nmi_watchdog(NULL);
setup_apic_nmi_watchdog();
apic_pm_activate(); apic_pm_activate();
} }
......
This diff is collapsed.
...@@ -724,7 +724,7 @@ static void default_do_nmi(struct pt_regs * regs) ...@@ -724,7 +724,7 @@ static void default_do_nmi(struct pt_regs * regs)
* so it must be the NMI watchdog. * so it must be the NMI watchdog.
*/ */
if (nmi_watchdog) { if (nmi_watchdog) {
nmi_watchdog_tick(regs); nmi_watchdog_tick(regs, reason);
return; return;
} }
#endif #endif
......
...@@ -42,9 +42,7 @@ static void timer_stop(void) ...@@ -42,9 +42,7 @@ static void timer_stop(void)
int __init op_nmi_timer_init(struct oprofile_operations * ops) int __init op_nmi_timer_init(struct oprofile_operations * ops)
{ {
extern int nmi_active; if (atomic_read(&nmi_active) <= 0)
if (nmi_active <= 0)
return -ENODEV; return -ENODEV;
ops->start = timer_start; ops->start = timer_start;
......
...@@ -32,13 +32,14 @@ extern void release_perfctr_nmi(unsigned int); ...@@ -32,13 +32,14 @@ extern void release_perfctr_nmi(unsigned int);
extern int reserve_evntsel_nmi(unsigned int); extern int reserve_evntsel_nmi(unsigned int);
extern void release_evntsel_nmi(unsigned int); extern void release_evntsel_nmi(unsigned int);
extern void setup_apic_nmi_watchdog (void); extern void setup_apic_nmi_watchdog (void *);
extern int reserve_lapic_nmi(void); extern int reserve_lapic_nmi(void);
extern void release_lapic_nmi(void); extern void release_lapic_nmi(void);
extern void disable_timer_nmi_watchdog(void); extern void disable_timer_nmi_watchdog(void);
extern void enable_timer_nmi_watchdog(void); extern void enable_timer_nmi_watchdog(void);
extern void nmi_watchdog_tick (struct pt_regs * regs); extern void nmi_watchdog_tick (struct pt_regs * regs, unsigned reason);
extern atomic_t nmi_active;
extern unsigned int nmi_watchdog; extern unsigned int nmi_watchdog;
#define NMI_DEFAULT -1 #define NMI_DEFAULT -1
#define NMI_NONE 0 #define NMI_NONE 0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment