diff options
-rw-r--r-- | kernel/watchdog.c | 33 |
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 |
77 | int __read_mostly sysctl_hardlockup_all_cpu_backtrace; | ||
78 | 78 | ||
79 | #ifdef CONFIG_SOFTLOCKUP_DETECTOR | 79 | static int __init hardlockup_all_cpu_backtrace_setup(char *str) |
80 | int __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 | ||
83 | int __read_mostly watchdog_user_enabled; | 88 | int __read_mostly watchdog_user_enabled; |
84 | int __read_mostly watchdog_thresh = 10; | 89 | int __read_mostly watchdog_thresh = 10; |
85 | 90 | ||
86 | #ifdef CONFIG_SMP | ||
87 | int __read_mostly sysctl_softlockup_all_cpu_backtrace; | ||
88 | int __read_mostly sysctl_hardlockup_all_cpu_backtrace; | ||
89 | #endif | ||
90 | struct cpumask watchdog_cpumask __read_mostly; | 91 | struct cpumask watchdog_cpumask __read_mostly; |
91 | unsigned long *watchdog_cpumask_bits = cpumask_bits(&watchdog_cpumask); | 92 | unsigned 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 |
177 | int __read_mostly sysctl_softlockup_all_cpu_backtrace; | ||
178 | |||
176 | static int __init softlockup_all_cpu_backtrace_setup(char *str) | 179 | static 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 | ||
184 | static 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 | ||
194 | static void __lockup_detector_cleanup(void); | 187 | static void __lockup_detector_cleanup(void); |