aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/watchdog.c33
1 files changed, 13 insertions, 20 deletions
diff --git a/kernel/watchdog.c b/kernel/watchdog.c
index af37c040436c..a9bdfde73e4b 100644
--- a/kernel/watchdog.c
+++ b/kernel/watchdog.c
@@ -41,7 +41,6 @@ unsigned long __read_mostly watchdog_enabled = SOFT_WATCHDOG_ENABLED;
41#endif 41#endif
42 42
43#ifdef CONFIG_HARDLOCKUP_DETECTOR 43#ifdef CONFIG_HARDLOCKUP_DETECTOR
44/* boot commands */
45/* 44/*
46 * Should we panic when a soft-lockup or hard-lockup occurs: 45 * Should we panic when a soft-lockup or hard-lockup occurs:
47 */ 46 */
@@ -74,19 +73,21 @@ static int __init hardlockup_panic_setup(char *str)
74} 73}
75__setup("nmi_watchdog=", hardlockup_panic_setup); 74__setup("nmi_watchdog=", hardlockup_panic_setup);
76 75
77#endif 76# ifdef CONFIG_SMP
77int __read_mostly sysctl_hardlockup_all_cpu_backtrace;
78 78
79#ifdef CONFIG_SOFTLOCKUP_DETECTOR 79static int __init hardlockup_all_cpu_backtrace_setup(char *str)
80int __read_mostly soft_watchdog_enabled; 80{
81#endif 81 sysctl_hardlockup_all_cpu_backtrace = !!simple_strtol(str, NULL, 0);
82 return 1;
83}
84__setup("hardlockup_all_cpu_backtrace=", hardlockup_all_cpu_backtrace_setup);
85# endif /* CONFIG_SMP */
86#endif /* CONFIG_HARDLOCKUP_DETECTOR */
82 87
83int __read_mostly watchdog_user_enabled; 88int __read_mostly watchdog_user_enabled;
84int __read_mostly watchdog_thresh = 10; 89int __read_mostly watchdog_thresh = 10;
85 90
86#ifdef CONFIG_SMP
87int __read_mostly sysctl_softlockup_all_cpu_backtrace;
88int __read_mostly sysctl_hardlockup_all_cpu_backtrace;
89#endif
90struct cpumask watchdog_cpumask __read_mostly; 91struct cpumask watchdog_cpumask __read_mostly;
91unsigned long *watchdog_cpumask_bits = cpumask_bits(&watchdog_cpumask); 92unsigned long *watchdog_cpumask_bits = cpumask_bits(&watchdog_cpumask);
92 93
@@ -173,22 +174,14 @@ static int __init nosoftlockup_setup(char *str)
173__setup("nosoftlockup", nosoftlockup_setup); 174__setup("nosoftlockup", nosoftlockup_setup);
174 175
175#ifdef CONFIG_SMP 176#ifdef CONFIG_SMP
177int __read_mostly sysctl_softlockup_all_cpu_backtrace;
178
176static int __init softlockup_all_cpu_backtrace_setup(char *str) 179static int __init softlockup_all_cpu_backtrace_setup(char *str)
177{ 180{
178 sysctl_softlockup_all_cpu_backtrace = 181 sysctl_softlockup_all_cpu_backtrace = !!simple_strtol(str, NULL, 0);
179 !!simple_strtol(str, NULL, 0);
180 return 1; 182 return 1;
181} 183}
182__setup("softlockup_all_cpu_backtrace=", softlockup_all_cpu_backtrace_setup); 184__setup("softlockup_all_cpu_backtrace=", softlockup_all_cpu_backtrace_setup);
183#ifdef CONFIG_HARDLOCKUP_DETECTOR
184static int __init hardlockup_all_cpu_backtrace_setup(char *str)
185{
186 sysctl_hardlockup_all_cpu_backtrace =
187 !!simple_strtol(str, NULL, 0);
188 return 1;
189}
190__setup("hardlockup_all_cpu_backtrace=", hardlockup_all_cpu_backtrace_setup);
191#endif
192#endif 185#endif
193 186
194static void __lockup_detector_cleanup(void); 187static void __lockup_detector_cleanup(void);