nmi.h 895 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. * linux/include/asm-i386/nmi.h
  3. */
  4. #ifndef ASM_NMI_H
  5. #define ASM_NMI_H
  6. #include <linux/pm.h>
  7. struct pt_regs;
  8. typedef int (*nmi_callback_t)(struct pt_regs * regs, int cpu);
  9. /**
  10. * set_nmi_callback
  11. *
  12. * Set a handler for an NMI. Only one handler may be
  13. * set. Return 1 if the NMI was handled.
  14. */
  15. void set_nmi_callback(nmi_callback_t callback);
  16. /**
  17. * unset_nmi_callback
  18. *
  19. * Remove the handler previously set.
  20. */
  21. void unset_nmi_callback(void);
  22. extern void setup_apic_nmi_watchdog (void);
  23. extern int reserve_lapic_nmi(void);
  24. extern void release_lapic_nmi(void);
  25. extern void disable_timer_nmi_watchdog(void);
  26. extern void enable_timer_nmi_watchdog(void);
  27. extern void nmi_watchdog_tick (struct pt_regs * regs);
  28. extern unsigned int nmi_watchdog;
  29. #define NMI_DEFAULT -1
  30. #define NMI_NONE 0
  31. #define NMI_IO_APIC 1
  32. #define NMI_LOCAL_APIC 2
  33. #define NMI_INVALID 3
  34. #endif /* ASM_NMI_H */