blob: 67d99479999938450c2361656f7aeaa7911e3c04 [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
Linus Torvalds1da177e2005-04-16 15:20:36 -07009struct pt_regs;
Don Zickus3e4ff112006-06-26 13:57:01 +020010
Linus Torvalds1da177e2005-04-16 15:20:36 -070011typedef int (*nmi_callback_t)(struct pt_regs * regs, int cpu);
Don Zickus3e4ff112006-06-26 13:57:01 +020012
13/**
Linus Torvalds1da177e2005-04-16 15:20:36 -070014 * set_nmi_callback
15 *
16 * Set a handler for an NMI. Only one handler may be
17 * set. Return 1 if the NMI was handled.
18 */
19void set_nmi_callback(nmi_callback_t callback);
Don Zickus3e4ff112006-06-26 13:57:01 +020020
21/**
Linus Torvalds1da177e2005-04-16 15:20:36 -070022 * unset_nmi_callback
23 *
24 * Remove the handler previously set.
25 */
26void unset_nmi_callback(void);
Don Zickus3e4ff112006-06-26 13:57:01 +020027
28extern void setup_apic_nmi_watchdog (void);
29extern int reserve_lapic_nmi(void);
30extern void release_lapic_nmi(void);
31extern void disable_timer_nmi_watchdog(void);
32extern void enable_timer_nmi_watchdog(void);
33extern void nmi_watchdog_tick (struct pt_regs * regs);
34
35extern unsigned int nmi_watchdog;
36#define NMI_DEFAULT -1
37#define NMI_NONE 0
38#define NMI_IO_APIC 1
39#define NMI_LOCAL_APIC 2
40#define NMI_INVALID 3
41
Linus Torvalds1da177e2005-04-16 15:20:36 -070042#endif /* ASM_NMI_H */