blob: 34d6bf063b6eded65e59f91711e449f1728669be [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
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 Zickus3e4ff112006-06-26 13:57:01 +02008
Don Zickus3e4ff112006-06-26 13:57:01 +02009/**
Don Zickus2fbe7b22006-09-26 10:52:27 +020010 * do_nmi_callback
Linus Torvalds1da177e2005-04-16 15:20:36 -070011 *
Don Zickus2fbe7b22006-09-26 10:52:27 +020012 * Check to see if a callback exists and execute it. Return 1
13 * if the handler exists and was handled successfully.
Linus Torvalds1da177e2005-04-16 15:20:36 -070014 */
Don Zickus2fbe7b22006-09-26 10:52:27 +020015int do_nmi_callback(struct pt_regs *regs, int cpu);
Don Zickus3e4ff112006-06-26 13:57:01 +020016
Don Zickus828f0af2006-09-26 10:52:26 +020017extern int avail_to_resrv_perfctr_nmi_bit(unsigned int);
18extern int avail_to_resrv_perfctr_nmi(unsigned int);
19extern int reserve_perfctr_nmi(unsigned int);
20extern void release_perfctr_nmi(unsigned int);
21extern int reserve_evntsel_nmi(unsigned int);
22extern void release_evntsel_nmi(unsigned int);
23
Don Zickusb7471c62006-09-26 10:52:26 +020024extern void setup_apic_nmi_watchdog (void *);
Don Zickus3e4ff112006-06-26 13:57:01 +020025extern void disable_timer_nmi_watchdog(void);
26extern void enable_timer_nmi_watchdog(void);
Don Zickus3adbbcc2006-09-26 10:52:26 +020027extern int nmi_watchdog_tick (struct pt_regs * regs, unsigned reason);
Don Zickus3e4ff112006-06-26 13:57:01 +020028
Don Zickusb7471c62006-09-26 10:52:26 +020029extern atomic_t nmi_active;
Don Zickus3e4ff112006-06-26 13:57:01 +020030extern 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 Torvalds1da177e2005-04-16 15:20:36 -070037#endif /* ASM_NMI_H */