diff options
Diffstat (limited to 'include/asm-x86_64/nmi.h')
-rw-r--r-- | include/asm-x86_64/nmi.h | 38 |
1 files changed, 17 insertions, 21 deletions
diff --git a/include/asm-x86_64/nmi.h b/include/asm-x86_64/nmi.h index efb45c894d76..cbf2669bca71 100644 --- a/include/asm-x86_64/nmi.h +++ b/include/asm-x86_64/nmi.h | |||
@@ -7,24 +7,13 @@ | |||
7 | #include <linux/pm.h> | 7 | #include <linux/pm.h> |
8 | #include <asm/io.h> | 8 | #include <asm/io.h> |
9 | 9 | ||
10 | struct pt_regs; | ||
11 | |||
12 | typedef int (*nmi_callback_t)(struct pt_regs * regs, int cpu); | ||
13 | |||
14 | /** | ||
15 | * set_nmi_callback | ||
16 | * | ||
17 | * Set a handler for an NMI. Only one handler may be | ||
18 | * set. Return 1 if the NMI was handled. | ||
19 | */ | ||
20 | void set_nmi_callback(nmi_callback_t callback); | ||
21 | |||
22 | /** | 10 | /** |
23 | * unset_nmi_callback | 11 | * do_nmi_callback |
24 | * | 12 | * |
25 | * Remove the handler previously set. | 13 | * Check to see if a callback exists and execute it. Return 1 |
14 | * if the handler exists and was handled successfully. | ||
26 | */ | 15 | */ |
27 | void unset_nmi_callback(void); | 16 | int do_nmi_callback(struct pt_regs *regs, int cpu); |
28 | 17 | ||
29 | #ifdef CONFIG_PM | 18 | #ifdef CONFIG_PM |
30 | 19 | ||
@@ -48,25 +37,32 @@ static inline void unset_nmi_pm_callback(struct pm_dev * dev) | |||
48 | #endif /* CONFIG_PM */ | 37 | #endif /* CONFIG_PM */ |
49 | 38 | ||
50 | extern void default_do_nmi(struct pt_regs *); | 39 | extern void default_do_nmi(struct pt_regs *); |
51 | extern void die_nmi(char *str, struct pt_regs *regs); | 40 | extern void die_nmi(char *str, struct pt_regs *regs, int do_panic); |
52 | 41 | ||
53 | #define get_nmi_reason() inb(0x61) | 42 | #define get_nmi_reason() inb(0x61) |
54 | 43 | ||
55 | extern int panic_on_timeout; | 44 | extern int panic_on_timeout; |
56 | extern int unknown_nmi_panic; | 45 | extern int unknown_nmi_panic; |
46 | extern int nmi_watchdog_enabled; | ||
57 | 47 | ||
58 | extern int check_nmi_watchdog(void); | 48 | extern int check_nmi_watchdog(void); |
59 | 49 | extern int avail_to_resrv_perfctr_nmi_bit(unsigned int); | |
60 | extern void setup_apic_nmi_watchdog (void); | 50 | extern int avail_to_resrv_perfctr_nmi(unsigned int); |
61 | extern int reserve_lapic_nmi(void); | 51 | extern int reserve_perfctr_nmi(unsigned int); |
62 | extern void release_lapic_nmi(void); | 52 | extern void release_perfctr_nmi(unsigned int); |
53 | extern int reserve_evntsel_nmi(unsigned int); | ||
54 | extern void release_evntsel_nmi(unsigned int); | ||
55 | |||
56 | extern void setup_apic_nmi_watchdog (void *); | ||
57 | extern void stop_apic_nmi_watchdog (void *); | ||
63 | extern void disable_timer_nmi_watchdog(void); | 58 | extern void disable_timer_nmi_watchdog(void); |
64 | extern void enable_timer_nmi_watchdog(void); | 59 | extern void enable_timer_nmi_watchdog(void); |
65 | extern void nmi_watchdog_tick (struct pt_regs * regs, unsigned reason); | 60 | extern int nmi_watchdog_tick (struct pt_regs * regs, unsigned reason); |
66 | 61 | ||
67 | extern void nmi_watchdog_default(void); | 62 | extern void nmi_watchdog_default(void); |
68 | extern int setup_nmi_watchdog(char *); | 63 | extern int setup_nmi_watchdog(char *); |
69 | 64 | ||
65 | extern atomic_t nmi_active; | ||
70 | extern unsigned int nmi_watchdog; | 66 | extern unsigned int nmi_watchdog; |
71 | #define NMI_DEFAULT -1 | 67 | #define NMI_DEFAULT -1 |
72 | #define NMI_NONE 0 | 68 | #define NMI_NONE 0 |