mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 21:54:34 -04:00
[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>
This commit is contained in:
parent
b7471c6da9
commit
3adbbcce9a
6 changed files with 57 additions and 29 deletions
|
|
@ -37,7 +37,7 @@ extern int reserve_lapic_nmi(void);
|
|||
extern void release_lapic_nmi(void);
|
||||
extern void disable_timer_nmi_watchdog(void);
|
||||
extern void enable_timer_nmi_watchdog(void);
|
||||
extern void nmi_watchdog_tick (struct pt_regs * regs, unsigned reason);
|
||||
extern int nmi_watchdog_tick (struct pt_regs * regs, unsigned reason);
|
||||
|
||||
extern atomic_t nmi_active;
|
||||
extern unsigned int nmi_watchdog;
|
||||
|
|
|
|||
|
|
@ -26,6 +26,14 @@ void set_nmi_callback(nmi_callback_t callback);
|
|||
*/
|
||||
void unset_nmi_callback(void);
|
||||
|
||||
/**
|
||||
* do_nmi_callback
|
||||
*
|
||||
* Check to see if a callback exists and execute it. Return 1
|
||||
* if the handler exists and was handled successfully.
|
||||
*/
|
||||
int do_nmi_callback(struct pt_regs *regs, int cpu);
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
|
||||
/** Replace the PM callback routine for NMI. */
|
||||
|
|
@ -68,7 +76,7 @@ extern int reserve_lapic_nmi(void);
|
|||
extern void release_lapic_nmi(void);
|
||||
extern void disable_timer_nmi_watchdog(void);
|
||||
extern void enable_timer_nmi_watchdog(void);
|
||||
extern void nmi_watchdog_tick (struct pt_regs * regs, unsigned reason);
|
||||
extern int nmi_watchdog_tick (struct pt_regs * regs, unsigned reason);
|
||||
|
||||
extern void nmi_watchdog_default(void);
|
||||
extern int setup_nmi_watchdog(char *);
|
||||
|
|
|
|||
Loading…
Reference in a new issue