Blame view

include/linux/nmi.h 1.48 KB
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
1
2
3
4
5
  /*
   *  linux/include/linux/nmi.h
   */
  #ifndef LINUX_NMI_H
  #define LINUX_NMI_H
9938406ab   Michal Schmidt   [PATCH] Make touc...
6
  #include <linux/sched.h>
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
7
8
9
10
11
12
13
14
15
16
  #include <asm/irq.h>
  
  /**
   * touch_nmi_watchdog - restart NMI watchdog timeout.
   * 
   * If the architecture supports the NMI watchdog, touch_nmi_watchdog()
   * may be used to reset the timeout - for code which intentionally
   * disables interrupts for a long time. This call is stateless.
   */
  #ifdef ARCH_HAS_NMI_WATCHDOG
bb81a09e5   Andrew Morton   [PATCH] x86: all ...
17
  #include <asm/nmi.h>
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
18
  extern void touch_nmi_watchdog(void);
5d0e600d9   Ingo Molnar   [PATCH] x86: fix ...
19
20
  extern void acpi_nmi_disable(void);
  extern void acpi_nmi_enable(void);
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
21
  #else
cafcd80d2   Don Zickus   lockup_detector: ...
22
  #ifndef CONFIG_HARDLOCKUP_DETECTOR
5d0e600d9   Ingo Molnar   [PATCH] x86: fix ...
23
24
25
26
  static inline void touch_nmi_watchdog(void)
  {
  	touch_softlockup_watchdog();
  }
504d7cf10   Don Zickus   nmi_watchdog: Com...
27
28
29
  #else
  extern void touch_nmi_watchdog(void);
  #endif
5d0e600d9   Ingo Molnar   [PATCH] x86: fix ...
30
31
  static inline void acpi_nmi_disable(void) { }
  static inline void acpi_nmi_enable(void) { }
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
32
  #endif
47cab6a72   Ingo Molnar   debug lockups: Im...
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
  /*
   * Create trigger_all_cpu_backtrace() out of the arch-provided
   * base function. Return whether such support was available,
   * to allow calling code to fall back to some other mechanism:
   */
  #ifdef arch_trigger_all_cpu_backtrace
  static inline bool trigger_all_cpu_backtrace(void)
  {
  	arch_trigger_all_cpu_backtrace();
  
  	return true;
  }
  #else
  static inline bool trigger_all_cpu_backtrace(void)
  {
  	return false;
  }
bb81a09e5   Andrew Morton   [PATCH] x86: all ...
50
  #endif
58687acba   Don Zickus   lockup_detector: ...
51
  #ifdef CONFIG_LOCKUP_DETECTOR
84e478c6f   Don Zickus   nmi_watchdog: Con...
52
  int hw_nmi_is_cpu_stuck(struct pt_regs *);
504d7cf10   Don Zickus   nmi_watchdog: Com...
53
  u64 hw_nmi_get_sample_period(void);
58687acba   Don Zickus   lockup_detector: ...
54
  extern int watchdog_enabled;
504d7cf10   Don Zickus   nmi_watchdog: Com...
55
  struct ctl_table;
58687acba   Don Zickus   lockup_detector: ...
56
  extern int proc_dowatchdog_enabled(struct ctl_table *, int ,
47195d576   Don Zickus   nmi_watchdog: Cle...
57
  			void __user *, size_t *, loff_t *);
84e478c6f   Don Zickus   nmi_watchdog: Con...
58
  #endif
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
59
  #endif