Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
| 2 | * linux/include/asm-i386/nmi.h |
| 3 | */ |
| 4 | #ifndef ASM_NMI_H |
| 5 | #define ASM_NMI_H |
| 6 | |
| 7 | #include <linux/pm.h> |
Don Zickus | 3e4ff11 | 2006-06-26 13:57:01 +0200 | [diff] [blame] | 8 | |
Don Zickus | 3e4ff11 | 2006-06-26 13:57:01 +0200 | [diff] [blame] | 9 | /** |
Don Zickus | 2fbe7b2 | 2006-09-26 10:52:27 +0200 | [diff] [blame^] | 10 | * do_nmi_callback |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 11 | * |
Don Zickus | 2fbe7b2 | 2006-09-26 10:52:27 +0200 | [diff] [blame^] | 12 | * Check to see if a callback exists and execute it. Return 1 |
| 13 | * if the handler exists and was handled successfully. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 14 | */ |
Don Zickus | 2fbe7b2 | 2006-09-26 10:52:27 +0200 | [diff] [blame^] | 15 | int do_nmi_callback(struct pt_regs *regs, int cpu); |
Don Zickus | 3e4ff11 | 2006-06-26 13:57:01 +0200 | [diff] [blame] | 16 | |
Don Zickus | 828f0af | 2006-09-26 10:52:26 +0200 | [diff] [blame] | 17 | extern int avail_to_resrv_perfctr_nmi_bit(unsigned int); |
| 18 | extern int avail_to_resrv_perfctr_nmi(unsigned int); |
| 19 | extern int reserve_perfctr_nmi(unsigned int); |
| 20 | extern void release_perfctr_nmi(unsigned int); |
| 21 | extern int reserve_evntsel_nmi(unsigned int); |
| 22 | extern void release_evntsel_nmi(unsigned int); |
| 23 | |
Don Zickus | b7471c6 | 2006-09-26 10:52:26 +0200 | [diff] [blame] | 24 | extern void setup_apic_nmi_watchdog (void *); |
Don Zickus | 3e4ff11 | 2006-06-26 13:57:01 +0200 | [diff] [blame] | 25 | extern void disable_timer_nmi_watchdog(void); |
| 26 | extern void enable_timer_nmi_watchdog(void); |
Don Zickus | 3adbbcc | 2006-09-26 10:52:26 +0200 | [diff] [blame] | 27 | extern int nmi_watchdog_tick (struct pt_regs * regs, unsigned reason); |
Don Zickus | 3e4ff11 | 2006-06-26 13:57:01 +0200 | [diff] [blame] | 28 | |
Don Zickus | b7471c6 | 2006-09-26 10:52:26 +0200 | [diff] [blame] | 29 | extern atomic_t nmi_active; |
Don Zickus | 3e4ff11 | 2006-06-26 13:57:01 +0200 | [diff] [blame] | 30 | extern unsigned int nmi_watchdog; |
| 31 | #define NMI_DEFAULT -1 |
| 32 | #define NMI_NONE 0 |
| 33 | #define NMI_IO_APIC 1 |
| 34 | #define NMI_LOCAL_APIC 2 |
| 35 | #define NMI_INVALID 3 |
| 36 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 37 | #endif /* ASM_NMI_H */ |