| Line | |
|---|
| 1 | /* |
|---|
| 2 | * include/asm-xen/asm-i386/mach-xen/mach_traps.h |
|---|
| 3 | * |
|---|
| 4 | * Machine specific NMI handling for Xen |
|---|
| 5 | */ |
|---|
| 6 | #ifndef _MACH_TRAPS_H |
|---|
| 7 | #define _MACH_TRAPS_H |
|---|
| 8 | |
|---|
| 9 | #include <linux/bitops.h> |
|---|
| 10 | #include <xen/interface/nmi.h> |
|---|
| 11 | |
|---|
| 12 | static inline void clear_mem_error(unsigned char reason) {} |
|---|
| 13 | static inline void clear_io_check_error(unsigned char reason) {} |
|---|
| 14 | |
|---|
| 15 | static inline unsigned char get_nmi_reason(void) |
|---|
| 16 | { |
|---|
| 17 | shared_info_t *s = HYPERVISOR_shared_info; |
|---|
| 18 | unsigned char reason = 0; |
|---|
| 19 | |
|---|
| 20 | /* construct a value which looks like it came from |
|---|
| 21 | * port 0x61. |
|---|
| 22 | */ |
|---|
| 23 | if (test_bit(_XEN_NMIREASON_io_error, &s->arch.nmi_reason)) |
|---|
| 24 | reason |= 0x40; |
|---|
| 25 | if (test_bit(_XEN_NMIREASON_parity_error, &s->arch.nmi_reason)) |
|---|
| 26 | reason |= 0x80; |
|---|
| 27 | |
|---|
| 28 | return reason; |
|---|
| 29 | } |
|---|
| 30 | |
|---|
| 31 | static inline void reassert_nmi(void) {} |
|---|
| 32 | |
|---|
| 33 | #endif /* !_MACH_TRAPS_H */ |
|---|
Note: See
TracBrowser
for help on using the repository browser.