8 #ifdef ARCH_HAS_NMI_WATCHDOG
13 * Check to see if a callback exists and execute it. Return 1
14 * if the handler exists and was handled successfully.
16 int do_nmi_callback(struct pt_regs *regs, int cpu);
18 extern void die_nmi(char *str, struct pt_regs *regs, int do_panic);
19 extern int check_nmi_watchdog(void);
20 extern int nmi_watchdog_enabled;
21 extern int avail_to_resrv_perfctr_nmi_bit(unsigned int);
22 extern int reserve_perfctr_nmi(unsigned int);
23 extern void release_perfctr_nmi(unsigned int);
24 extern int reserve_evntsel_nmi(unsigned int);
25 extern void release_evntsel_nmi(unsigned int);
27 extern void setup_apic_nmi_watchdog(void *);
28 extern void stop_apic_nmi_watchdog(void *);
29 extern void disable_timer_nmi_watchdog(void);
30 extern void enable_timer_nmi_watchdog(void);
31 extern int nmi_watchdog_tick(struct pt_regs *regs, unsigned reason);
32 extern void cpu_nmi_set_wd_enabled(void);
34 extern atomic_t nmi_active;
35 extern unsigned int nmi_watchdog;
38 #define NMI_LOCAL_APIC 2
42 extern int proc_nmi_enabled(struct ctl_table *, int ,
43 void __user *, size_t *, loff_t *);
44 extern int unknown_nmi_panic;
46 void arch_trigger_all_cpu_backtrace(void);
47 #define arch_trigger_all_cpu_backtrace arch_trigger_all_cpu_backtrace
49 static inline void localise_nmi_watchdog(void)
51 if (nmi_watchdog == NMI_IO_APIC)
52 nmi_watchdog = NMI_LOCAL_APIC;
55 /* check if nmi_watchdog is active (ie was specified at boot) */
56 static inline int nmi_watchdog_active(void)
59 * actually it should be:
60 * return (nmi_watchdog == NMI_LOCAL_APIC ||
61 * nmi_watchdog == NMI_IO_APIC)
62 * but since they are power of two we could use a
65 return nmi_watchdog & (NMI_LOCAL_APIC | NMI_IO_APIC);
69 void lapic_watchdog_stop(void);
70 int lapic_watchdog_init(unsigned nmi_hz);
71 int lapic_wd_event(unsigned nmi_hz);
72 unsigned lapic_adjust_nmi_hz(unsigned hz);
73 void disable_lapic_nmi_watchdog(void);
74 void enable_lapic_nmi_watchdog(void);
76 void restart_nmi(void);
78 #endif /* _ASM_X86_NMI_H */