10 * Check to see if a callback exists and execute it. Return 1
11 * if the handler exists and was handled successfully.
13 int do_nmi_callback(struct pt_regs
*regs
, int cpu
);
17 /** Replace the PM callback routine for NMI. */
18 struct pm_dev
* set_nmi_pm_callback(pm_callback callback
);
20 /** Unset the PM callback routine back to the default. */
21 void unset_nmi_pm_callback(struct pm_dev
* dev
);
25 static inline struct pm_dev
* set_nmi_pm_callback(pm_callback callback
)
30 static inline void unset_nmi_pm_callback(struct pm_dev
* dev
)
34 #endif /* CONFIG_PM */
36 extern void default_do_nmi(struct pt_regs
*);
37 extern void die_nmi(char *str
, struct pt_regs
*regs
, int do_panic
);
39 #define get_nmi_reason() inb(0x61)
41 extern int unknown_nmi_panic
;
42 extern int nmi_watchdog_enabled
;
44 extern int check_nmi_watchdog(void);
45 extern int avail_to_resrv_perfctr_nmi_bit(unsigned int);
46 extern int avail_to_resrv_perfctr_nmi(unsigned int);
47 extern int reserve_perfctr_nmi(unsigned int);
48 extern void release_perfctr_nmi(unsigned int);
49 extern int reserve_evntsel_nmi(unsigned int);
50 extern void release_evntsel_nmi(unsigned int);
52 extern void setup_apic_nmi_watchdog (void *);
53 extern void stop_apic_nmi_watchdog (void *);
54 extern void disable_timer_nmi_watchdog(void);
55 extern void enable_timer_nmi_watchdog(void);
56 extern int nmi_watchdog_tick (struct pt_regs
* regs
, unsigned reason
);
58 extern void nmi_watchdog_default(void);
60 extern atomic_t nmi_active
;
61 extern unsigned int nmi_watchdog
;
62 #define NMI_DISABLED -1
65 #define NMI_LOCAL_APIC 2
67 #define NMI_DEFAULT NMI_DISABLED
71 extern int proc_nmi_enabled(struct ctl_table
*, int , struct file
*,
72 void __user
*, size_t *, loff_t
*);
74 extern int unknown_nmi_panic
;
76 void __trigger_all_cpu_backtrace(void);
77 #define trigger_all_cpu_backtrace() __trigger_all_cpu_backtrace()
80 void lapic_watchdog_stop(void);
81 int lapic_watchdog_init(unsigned nmi_hz
);
82 int lapic_wd_event(unsigned nmi_hz
);
83 unsigned lapic_adjust_nmi_hz(unsigned hz
);
84 int lapic_watchdog_ok(void);
85 void disable_lapic_nmi_watchdog(void);
86 void enable_lapic_nmi_watchdog(void);
88 void restart_nmi(void);
90 #endif /* ASM_NMI_H */