2 * linux/include/asm-i386/nmi.h
9 #include <xen/interface/nmi.h>
13 typedef int (*nmi_callback_t)(struct pt_regs * regs, int cpu);
18 * Set a handler for an NMI. Only one handler may be
19 * set. Return 1 if the NMI was handled.
21 void set_nmi_callback(nmi_callback_t callback);
26 * Remove the handler previously set.
28 void unset_nmi_callback(void);
32 /** Replace the PM callback routine for NMI. */
33 struct pm_dev * set_nmi_pm_callback(pm_callback callback);
35 /** Unset the PM callback routine back to the default. */
36 void unset_nmi_pm_callback(struct pm_dev * dev);
40 static inline struct pm_dev * set_nmi_pm_callback(pm_callback callback)
45 static inline void unset_nmi_pm_callback(struct pm_dev * dev)
49 #endif /* CONFIG_PM */
51 extern void default_do_nmi(struct pt_regs *);
52 extern void die_nmi(char *str, struct pt_regs *regs);
54 static inline unsigned char get_nmi_reason(void)
56 shared_info_t *s = HYPERVISOR_shared_info;
57 unsigned char reason = 0;
59 /* construct a value which looks like it came from
62 if (test_bit(_XEN_NMIREASON_io_error, &s->arch.nmi_reason))
64 if (test_bit(_XEN_NMIREASON_parity_error, &s->arch.nmi_reason))
70 extern int panic_on_timeout;
71 extern int unknown_nmi_panic;
73 extern int check_nmi_watchdog(void);
75 #endif /* ASM_NMI_H */