2 * linux/include/asm-i386/nmi.h
11 #include <xen/interface/nmi.h>
17 * Check to see if a callback exists and execute it. Return 1
18 * if the handler exists and was handled successfully.
20 int do_nmi_callback(struct pt_regs *regs, int cpu);
24 /** Replace the PM callback routine for NMI. */
25 struct pm_dev * set_nmi_pm_callback(pm_callback callback);
27 /** Unset the PM callback routine back to the default. */
28 void unset_nmi_pm_callback(struct pm_dev * dev);
32 static inline struct pm_dev * set_nmi_pm_callback(pm_callback callback)
37 static inline void unset_nmi_pm_callback(struct pm_dev * dev)
41 #endif /* CONFIG_PM */
43 extern void default_do_nmi(struct pt_regs *);
44 extern void die_nmi(char *str, struct pt_regs *regs, int do_panic);
47 static inline unsigned char get_nmi_reason(void)
49 shared_info_t *s = HYPERVISOR_shared_info;
50 unsigned char reason = 0;
52 /* construct a value which looks like it came from
55 if (test_bit(_XEN_NMIREASON_io_error, &s->arch.nmi_reason))
57 if (test_bit(_XEN_NMIREASON_parity_error, &s->arch.nmi_reason))
63 #define get_nmi_reason() inb(0x61)
66 extern int panic_on_timeout;
67 extern int unknown_nmi_panic;
68 extern int nmi_watchdog_enabled;
70 extern int check_nmi_watchdog(void);
71 extern int avail_to_resrv_perfctr_nmi_bit(unsigned int);
72 extern int avail_to_resrv_perfctr_nmi(unsigned int);
73 extern int reserve_perfctr_nmi(unsigned int);
74 extern void release_perfctr_nmi(unsigned int);
75 extern int reserve_evntsel_nmi(unsigned int);
76 extern void release_evntsel_nmi(unsigned int);
78 extern void setup_apic_nmi_watchdog (void *);
79 extern void stop_apic_nmi_watchdog (void *);
80 extern void disable_timer_nmi_watchdog(void);
81 extern void enable_timer_nmi_watchdog(void);
82 extern int nmi_watchdog_tick (struct pt_regs * regs, unsigned reason);
84 extern void nmi_watchdog_default(void);
85 extern int setup_nmi_watchdog(char *);
87 extern atomic_t nmi_active;
88 extern unsigned int nmi_watchdog;
89 #define NMI_DEFAULT -1
92 #define NMI_LOCAL_APIC 2
97 extern int proc_nmi_enabled(struct ctl_table *, int , struct file *,
98 void __user *, size_t *, loff_t *);
100 extern int unknown_nmi_panic;
102 void __trigger_all_cpu_backtrace(void);
103 #define trigger_all_cpu_backtrace() __trigger_all_cpu_backtrace()
105 #endif /* ASM_NMI_H */