diff options
Diffstat (limited to 'include/linux/nmi.h')
-rw-r--r-- | include/linux/nmi.h | 60 |
1 files changed, 25 insertions, 35 deletions
diff --git a/include/linux/nmi.h b/include/linux/nmi.h index 91a3a4a4c8ae..cfebb3bc4eed 100644 --- a/include/linux/nmi.h +++ b/include/linux/nmi.h | |||
@@ -14,11 +14,29 @@ | |||
14 | void lockup_detector_init(void); | 14 | void lockup_detector_init(void); |
15 | void lockup_detector_soft_poweroff(void); | 15 | void lockup_detector_soft_poweroff(void); |
16 | void lockup_detector_cleanup(void); | 16 | void lockup_detector_cleanup(void); |
17 | bool is_hardlockup(void); | ||
18 | |||
19 | extern int watchdog_user_enabled; | ||
20 | extern int nmi_watchdog_enabled; | ||
21 | extern int soft_watchdog_enabled; | ||
22 | extern int watchdog_thresh; | ||
23 | extern unsigned long watchdog_enabled; | ||
24 | |||
25 | extern struct cpumask watchdog_cpumask; | ||
26 | extern unsigned long *watchdog_cpumask_bits; | ||
27 | #ifdef CONFIG_SMP | ||
28 | extern int sysctl_softlockup_all_cpu_backtrace; | ||
29 | extern int sysctl_hardlockup_all_cpu_backtrace; | ||
17 | #else | 30 | #else |
31 | #define sysctl_softlockup_all_cpu_backtrace 0 | ||
32 | #define sysctl_hardlockup_all_cpu_backtrace 0 | ||
33 | #endif /* !CONFIG_SMP */ | ||
34 | |||
35 | #else /* CONFIG_LOCKUP_DETECTOR */ | ||
18 | static inline void lockup_detector_init(void) { } | 36 | static inline void lockup_detector_init(void) { } |
19 | static inline void lockup_detector_soft_poweroff(void) { } | 37 | static inline void lockup_detector_soft_poweroff(void) { } |
20 | static inline void lockup_detector_cleanup(void) { } | 38 | static inline void lockup_detector_cleanup(void) { } |
21 | #endif | 39 | #endif /* !CONFIG_LOCKUP_DETECTOR */ |
22 | 40 | ||
23 | #ifdef CONFIG_SOFTLOCKUP_DETECTOR | 41 | #ifdef CONFIG_SOFTLOCKUP_DETECTOR |
24 | extern void touch_softlockup_watchdog_sched(void); | 42 | extern void touch_softlockup_watchdog_sched(void); |
@@ -26,28 +44,17 @@ extern void touch_softlockup_watchdog(void); | |||
26 | extern void touch_softlockup_watchdog_sync(void); | 44 | extern void touch_softlockup_watchdog_sync(void); |
27 | extern void touch_all_softlockup_watchdogs(void); | 45 | extern void touch_all_softlockup_watchdogs(void); |
28 | extern unsigned int softlockup_panic; | 46 | extern unsigned int softlockup_panic; |
29 | extern int soft_watchdog_enabled; | ||
30 | #else | 47 | #else |
31 | static inline void touch_softlockup_watchdog_sched(void) | 48 | static inline void touch_softlockup_watchdog_sched(void) { } |
32 | { | 49 | static inline void touch_softlockup_watchdog(void) { } |
33 | } | 50 | static inline void touch_softlockup_watchdog_sync(void) { } |
34 | static inline void touch_softlockup_watchdog(void) | 51 | static inline void touch_all_softlockup_watchdogs(void) { } |
35 | { | ||
36 | } | ||
37 | static inline void touch_softlockup_watchdog_sync(void) | ||
38 | { | ||
39 | } | ||
40 | static inline void touch_all_softlockup_watchdogs(void) | ||
41 | { | ||
42 | } | ||
43 | #endif | 52 | #endif |
44 | 53 | ||
45 | #ifdef CONFIG_DETECT_HUNG_TASK | 54 | #ifdef CONFIG_DETECT_HUNG_TASK |
46 | void reset_hung_task_detector(void); | 55 | void reset_hung_task_detector(void); |
47 | #else | 56 | #else |
48 | static inline void reset_hung_task_detector(void) | 57 | static inline void reset_hung_task_detector(void) { } |
49 | { | ||
50 | } | ||
51 | #endif | 58 | #endif |
52 | 59 | ||
53 | /* | 60 | /* |
@@ -92,7 +99,7 @@ static inline void arch_touch_nmi_watchdog(void) {} | |||
92 | 99 | ||
93 | /** | 100 | /** |
94 | * touch_nmi_watchdog - restart NMI watchdog timeout. | 101 | * touch_nmi_watchdog - restart NMI watchdog timeout. |
95 | * | 102 | * |
96 | * If the architecture supports the NMI watchdog, touch_nmi_watchdog() | 103 | * If the architecture supports the NMI watchdog, touch_nmi_watchdog() |
97 | * may be used to reset the timeout - for code which intentionally | 104 | * may be used to reset the timeout - for code which intentionally |
98 | * disables interrupts for a long time. This call is stateless. | 105 | * disables interrupts for a long time. This call is stateless. |
@@ -162,21 +169,6 @@ static inline bool trigger_single_cpu_backtrace(int cpu) | |||
162 | u64 hw_nmi_get_sample_period(int watchdog_thresh); | 169 | u64 hw_nmi_get_sample_period(int watchdog_thresh); |
163 | #endif | 170 | #endif |
164 | 171 | ||
165 | #ifdef CONFIG_LOCKUP_DETECTOR | ||
166 | extern int nmi_watchdog_enabled; | ||
167 | extern int watchdog_user_enabled; | ||
168 | extern int watchdog_thresh; | ||
169 | extern unsigned long watchdog_enabled; | ||
170 | extern struct cpumask watchdog_cpumask; | ||
171 | extern unsigned long *watchdog_cpumask_bits; | ||
172 | #ifdef CONFIG_SMP | ||
173 | extern int sysctl_softlockup_all_cpu_backtrace; | ||
174 | extern int sysctl_hardlockup_all_cpu_backtrace; | ||
175 | #else | ||
176 | #define sysctl_softlockup_all_cpu_backtrace 0 | ||
177 | #define sysctl_hardlockup_all_cpu_backtrace 0 | ||
178 | #endif | ||
179 | |||
180 | #if defined(CONFIG_HARDLOCKUP_CHECK_TIMESTAMP) && \ | 172 | #if defined(CONFIG_HARDLOCKUP_CHECK_TIMESTAMP) && \ |
181 | defined(CONFIG_HARDLOCKUP_DETECTOR) | 173 | defined(CONFIG_HARDLOCKUP_DETECTOR) |
182 | void watchdog_update_hrtimer_threshold(u64 period); | 174 | void watchdog_update_hrtimer_threshold(u64 period); |
@@ -184,7 +176,6 @@ void watchdog_update_hrtimer_threshold(u64 period); | |||
184 | static inline void watchdog_update_hrtimer_threshold(u64 period) { } | 176 | static inline void watchdog_update_hrtimer_threshold(u64 period) { } |
185 | #endif | 177 | #endif |
186 | 178 | ||
187 | extern bool is_hardlockup(void); | ||
188 | struct ctl_table; | 179 | struct ctl_table; |
189 | extern int proc_watchdog(struct ctl_table *, int , | 180 | extern int proc_watchdog(struct ctl_table *, int , |
190 | void __user *, size_t *, loff_t *); | 181 | void __user *, size_t *, loff_t *); |
@@ -196,7 +187,6 @@ extern int proc_watchdog_thresh(struct ctl_table *, int , | |||
196 | void __user *, size_t *, loff_t *); | 187 | void __user *, size_t *, loff_t *); |
197 | extern int proc_watchdog_cpumask(struct ctl_table *, int, | 188 | extern int proc_watchdog_cpumask(struct ctl_table *, int, |
198 | void __user *, size_t *, loff_t *); | 189 | void __user *, size_t *, loff_t *); |
199 | #endif | ||
200 | 190 | ||
201 | #ifdef CONFIG_HAVE_ACPI_APEI_NMI | 191 | #ifdef CONFIG_HAVE_ACPI_APEI_NMI |
202 | #include <asm/nmi.h> | 192 | #include <asm/nmi.h> |