diff options
Diffstat (limited to 'include/linux/nmi.h')
-rw-r--r-- | include/linux/nmi.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/include/linux/nmi.h b/include/linux/nmi.h index a78c35cff1ae..aacca824a6ae 100644 --- a/include/linux/nmi.h +++ b/include/linux/nmi.h | |||
@@ -7,6 +7,23 @@ | |||
7 | #include <linux/sched.h> | 7 | #include <linux/sched.h> |
8 | #include <asm/irq.h> | 8 | #include <asm/irq.h> |
9 | 9 | ||
10 | /* | ||
11 | * The run state of the lockup detectors is controlled by the content of the | ||
12 | * 'watchdog_enabled' variable. Each lockup detector has its dedicated bit - | ||
13 | * bit 0 for the hard lockup detector and bit 1 for the soft lockup detector. | ||
14 | * | ||
15 | * 'watchdog_user_enabled', 'nmi_watchdog_enabled' and 'soft_watchdog_enabled' | ||
16 | * are variables that are only used as an 'interface' between the parameters | ||
17 | * in /proc/sys/kernel and the internal state bits in 'watchdog_enabled'. The | ||
18 | * 'watchdog_thresh' variable is handled differently because its value is not | ||
19 | * boolean, and the lockup detectors are 'suspended' while 'watchdog_thresh' | ||
20 | * is equal zero. | ||
21 | */ | ||
22 | #define NMI_WATCHDOG_ENABLED_BIT 0 | ||
23 | #define SOFT_WATCHDOG_ENABLED_BIT 1 | ||
24 | #define NMI_WATCHDOG_ENABLED (1 << NMI_WATCHDOG_ENABLED_BIT) | ||
25 | #define SOFT_WATCHDOG_ENABLED (1 << SOFT_WATCHDOG_ENABLED_BIT) | ||
26 | |||
10 | /** | 27 | /** |
11 | * touch_nmi_watchdog - restart NMI watchdog timeout. | 28 | * touch_nmi_watchdog - restart NMI watchdog timeout. |
12 | * | 29 | * |
@@ -91,9 +108,16 @@ extern int nmi_watchdog_enabled; | |||
91 | extern int soft_watchdog_enabled; | 108 | extern int soft_watchdog_enabled; |
92 | extern int watchdog_user_enabled; | 109 | extern int watchdog_user_enabled; |
93 | extern int watchdog_thresh; | 110 | extern int watchdog_thresh; |
111 | extern unsigned long watchdog_enabled; | ||
94 | extern unsigned long *watchdog_cpumask_bits; | 112 | extern unsigned long *watchdog_cpumask_bits; |
113 | #ifdef CONFIG_SMP | ||
95 | extern int sysctl_softlockup_all_cpu_backtrace; | 114 | extern int sysctl_softlockup_all_cpu_backtrace; |
96 | extern int sysctl_hardlockup_all_cpu_backtrace; | 115 | extern int sysctl_hardlockup_all_cpu_backtrace; |
116 | #else | ||
117 | #define sysctl_softlockup_all_cpu_backtrace 0 | ||
118 | #define sysctl_hardlockup_all_cpu_backtrace 0 | ||
119 | #endif | ||
120 | extern bool is_hardlockup(void); | ||
97 | struct ctl_table; | 121 | struct ctl_table; |
98 | extern int proc_watchdog(struct ctl_table *, int , | 122 | extern int proc_watchdog(struct ctl_table *, int , |
99 | void __user *, size_t *, loff_t *); | 123 | void __user *, size_t *, loff_t *); |