ia64/xen-unstable

view linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/nmi.h @ 11221:7c9d7fc3dce5

[HVM] Fix SMBIOS entry point copy destination.
Spotted by Xiaowei Yang <xiaowei.yang@intel.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@localhost.localdomain
date Sat Aug 19 12:06:36 2006 +0100 (2006-08-19)
parents fd9b2c1bb577
children 3adf00179a63
line source
1 /*
2 * linux/include/asm-i386/nmi.h
3 */
4 #ifndef ASM_NMI_H
5 #define ASM_NMI_H
7 #include <linux/pm.h>
9 #include <xen/interface/nmi.h>
11 struct pt_regs;
13 typedef int (*nmi_callback_t)(struct pt_regs * regs, int cpu);
15 /**
16 * set_nmi_callback
17 *
18 * Set a handler for an NMI. Only one handler may be
19 * set. Return 1 if the NMI was handled.
20 */
21 void set_nmi_callback(nmi_callback_t callback);
23 /**
24 * unset_nmi_callback
25 *
26 * Remove the handler previously set.
27 */
28 void unset_nmi_callback(void);
30 #ifdef CONFIG_PM
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);
38 #else
40 static inline struct pm_dev * set_nmi_pm_callback(pm_callback callback)
41 {
42 return 0;
43 }
45 static inline void unset_nmi_pm_callback(struct pm_dev * dev)
46 {
47 }
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)
55 {
56 shared_info_t *s = HYPERVISOR_shared_info;
57 unsigned char reason = 0;
59 /* construct a value which looks like it came from
60 * port 0x61.
61 */
62 if (test_bit(_XEN_NMIREASON_io_error, &s->arch.nmi_reason))
63 reason |= 0x40;
64 if (test_bit(_XEN_NMIREASON_parity_error, &s->arch.nmi_reason))
65 reason |= 0x80;
67 return reason;
68 }
70 extern int panic_on_timeout;
71 extern int unknown_nmi_panic;
73 extern int check_nmi_watchdog(void);
75 #endif /* ASM_NMI_H */