diff options
| author | Olav Haugan <ohaugan@codeaurora.org> | 2016-11-03 15:10:57 -0700 |
|---|---|---|
| committer | Olav Haugan <ohaugan@codeaurora.org> | 2016-11-07 17:51:48 -0800 |
| commit | af04b3a2bad55cbe37b013a41469fabecbf5636f (patch) | |
| tree | 20f05549a0a60637130f04c9e2699a5688658a12 /include/linux/sched.h | |
| parent | 34a3cdf14eea4432681380cb3dc4d1a741945ffe (diff) | |
sched: Ensure watchdog is enabled before disabling
There is a race between watchdog being enabled by hotplug and core
isolation disabling the watchdog. When a CPU is hotplugged in and
the hotplug lock has been released the watchdog thread might not
have run yet to enable the watchdog. We have to wait for the
watchdog to be enabled before proceeding.
Change-Id: I88f73603b6d389a46f8e819d9b490091d5ba4fe9
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
Diffstat (limited to 'include/linux/sched.h')
| -rw-r--r-- | include/linux/sched.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index b1351226b102..94635c8805c9 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -446,6 +446,7 @@ extern unsigned int hardlockup_panic; void lockup_detector_init(void); extern void watchdog_enable(unsigned int cpu); extern void watchdog_disable(unsigned int cpu); +extern bool watchdog_configured(unsigned int cpu); #else static inline void touch_softlockup_watchdog_sched(void) { @@ -468,6 +469,14 @@ static inline void watchdog_enable(unsigned int cpu) static inline void watchdog_disable(unsigned int cpu) { } +static inline bool watchdog_configured(unsigned int cpu) +{ + /* + * Predend the watchdog is always configured. + * We will be waiting for the watchdog to be enabled in core isolation + */ + return true; +} #endif #ifdef CONFIG_DETECT_HUNG_TASK |
