diff options
author | Don Zickus <dzickus@redhat.com> | 2006-09-26 04:52:26 -0400 |
---|---|---|
committer | Andi Kleen <andi@basil.nowhere.org> | 2006-09-26 04:52:26 -0400 |
commit | 3adbbcce9a49b900d4cc118cdccfdefa78bf1afb (patch) | |
tree | 3163758ed23d973a54b396593957c63470f39a0d /include | |
parent | b7471c6da94d30d3deadc55986cc38d1ff57f9ca (diff) |
[PATCH] x86: Cleanup NMI interrupt path
This patch cleans up the NMI interrupt path. Instead of being gated by if
the 'nmi callback' is set, the interrupt handler now calls everyone who is
registered on the die_chain and additionally checks the nmi watchdog,
reseting it if enabled. This allows more subsystems to hook into the NMI if
they need to (without being block by set_nmi_callback).
Signed-off-by: Don Zickus <dzickus@redhat.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-i386/nmi.h | 2 | ||||
-rw-r--r-- | include/asm-x86_64/nmi.h | 10 |
2 files changed, 10 insertions, 2 deletions
diff --git a/include/asm-i386/nmi.h b/include/asm-i386/nmi.h index 4cda6801ecb8..da0e0b4e9139 100644 --- a/include/asm-i386/nmi.h +++ b/include/asm-i386/nmi.h | |||
@@ -37,7 +37,7 @@ extern int reserve_lapic_nmi(void); | |||
37 | extern void release_lapic_nmi(void); | 37 | extern void release_lapic_nmi(void); |
38 | extern void disable_timer_nmi_watchdog(void); | 38 | extern void disable_timer_nmi_watchdog(void); |
39 | extern void enable_timer_nmi_watchdog(void); | 39 | extern void enable_timer_nmi_watchdog(void); |
40 | extern void nmi_watchdog_tick (struct pt_regs * regs, unsigned reason); | 40 | extern int nmi_watchdog_tick (struct pt_regs * regs, unsigned reason); |
41 | 41 | ||
42 | extern atomic_t nmi_active; | 42 | extern atomic_t nmi_active; |
43 | extern unsigned int nmi_watchdog; | 43 | extern unsigned int nmi_watchdog; |
diff --git a/include/asm-x86_64/nmi.h b/include/asm-x86_64/nmi.h index 5918136fd853..8f02a2a416e6 100644 --- a/include/asm-x86_64/nmi.h +++ b/include/asm-x86_64/nmi.h | |||
@@ -26,6 +26,14 @@ void set_nmi_callback(nmi_callback_t callback); | |||
26 | */ | 26 | */ |
27 | void unset_nmi_callback(void); | 27 | void unset_nmi_callback(void); |
28 | 28 | ||
29 | /** | ||
30 | * do_nmi_callback | ||
31 | * | ||
32 | * Check to see if a callback exists and execute it. Return 1 | ||
33 | * if the handler exists and was handled successfully. | ||
34 | */ | ||
35 | int do_nmi_callback(struct pt_regs *regs, int cpu); | ||
36 | |||
29 | #ifdef CONFIG_PM | 37 | #ifdef CONFIG_PM |
30 | 38 | ||
31 | /** Replace the PM callback routine for NMI. */ | 39 | /** Replace the PM callback routine for NMI. */ |
@@ -68,7 +76,7 @@ extern int reserve_lapic_nmi(void); | |||
68 | extern void release_lapic_nmi(void); | 76 | extern void release_lapic_nmi(void); |
69 | extern void disable_timer_nmi_watchdog(void); | 77 | extern void disable_timer_nmi_watchdog(void); |
70 | extern void enable_timer_nmi_watchdog(void); | 78 | extern void enable_timer_nmi_watchdog(void); |
71 | extern void nmi_watchdog_tick (struct pt_regs * regs, unsigned reason); | 79 | extern int nmi_watchdog_tick (struct pt_regs * regs, unsigned reason); |
72 | 80 | ||
73 | extern void nmi_watchdog_default(void); | 81 | extern void nmi_watchdog_default(void); |
74 | extern int setup_nmi_watchdog(char *); | 82 | extern int setup_nmi_watchdog(char *); |