aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/nmi.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/nmi.h')
-rw-r--r--include/linux/nmi.h60
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 @@
14void lockup_detector_init(void); 14void lockup_detector_init(void);
15void lockup_detector_soft_poweroff(void); 15void lockup_detector_soft_poweroff(void);
16void lockup_detector_cleanup(void); 16void lockup_detector_cleanup(void);
17bool is_hardlockup(void);
18
19extern int watchdog_user_enabled;
20extern int nmi_watchdog_enabled;
21extern int soft_watchdog_enabled;
22extern int watchdog_thresh;
23extern unsigned long watchdog_enabled;
24
25extern struct cpumask watchdog_cpumask;
26extern unsigned long *watchdog_cpumask_bits;
27#ifdef CONFIG_SMP
28extern int sysctl_softlockup_all_cpu_backtrace;
29extern 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 */
18static inline void lockup_detector_init(void) { } 36static inline void lockup_detector_init(void) { }
19static inline void lockup_detector_soft_poweroff(void) { } 37static inline void lockup_detector_soft_poweroff(void) { }
20static inline void lockup_detector_cleanup(void) { } 38static 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
24extern void touch_softlockup_watchdog_sched(void); 42extern void touch_softlockup_watchdog_sched(void);
@@ -26,28 +44,17 @@ extern void touch_softlockup_watchdog(void);
26extern void touch_softlockup_watchdog_sync(void); 44extern void touch_softlockup_watchdog_sync(void);
27extern void touch_all_softlockup_watchdogs(void); 45extern void touch_all_softlockup_watchdogs(void);
28extern unsigned int softlockup_panic; 46extern unsigned int softlockup_panic;
29extern int soft_watchdog_enabled;
30#else 47#else
31static inline void touch_softlockup_watchdog_sched(void) 48static inline void touch_softlockup_watchdog_sched(void) { }
32{ 49static inline void touch_softlockup_watchdog(void) { }
33} 50static inline void touch_softlockup_watchdog_sync(void) { }
34static inline void touch_softlockup_watchdog(void) 51static inline void touch_all_softlockup_watchdogs(void) { }
35{
36}
37static inline void touch_softlockup_watchdog_sync(void)
38{
39}
40static 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
46void reset_hung_task_detector(void); 55void reset_hung_task_detector(void);
47#else 56#else
48static inline void reset_hung_task_detector(void) 57static 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)
162u64 hw_nmi_get_sample_period(int watchdog_thresh); 169u64 hw_nmi_get_sample_period(int watchdog_thresh);
163#endif 170#endif
164 171
165#ifdef CONFIG_LOCKUP_DETECTOR
166extern int nmi_watchdog_enabled;
167extern int watchdog_user_enabled;
168extern int watchdog_thresh;
169extern unsigned long watchdog_enabled;
170extern struct cpumask watchdog_cpumask;
171extern unsigned long *watchdog_cpumask_bits;
172#ifdef CONFIG_SMP
173extern int sysctl_softlockup_all_cpu_backtrace;
174extern 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)
182void watchdog_update_hrtimer_threshold(u64 period); 174void watchdog_update_hrtimer_threshold(u64 period);
@@ -184,7 +176,6 @@ void watchdog_update_hrtimer_threshold(u64 period);
184static inline void watchdog_update_hrtimer_threshold(u64 period) { } 176static inline void watchdog_update_hrtimer_threshold(u64 period) { }
185#endif 177#endif
186 178
187extern bool is_hardlockup(void);
188struct ctl_table; 179struct ctl_table;
189extern int proc_watchdog(struct ctl_table *, int , 180extern 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 *);
197extern int proc_watchdog_cpumask(struct ctl_table *, int, 188extern 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>