aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/time/clocksource.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c
index 935f39eb8aac..605656df16c4 100644
--- a/kernel/time/clocksource.c
+++ b/kernel/time/clocksource.c
@@ -152,12 +152,19 @@ static void __clocksource_unstable(struct clocksource *cs)
152 cs->flags &= ~(CLOCK_SOURCE_VALID_FOR_HRES | CLOCK_SOURCE_WATCHDOG); 152 cs->flags &= ~(CLOCK_SOURCE_VALID_FOR_HRES | CLOCK_SOURCE_WATCHDOG);
153 cs->flags |= CLOCK_SOURCE_UNSTABLE; 153 cs->flags |= CLOCK_SOURCE_UNSTABLE;
154 154
155 if (list_empty(&cs->list)) 155 /*
156 * If the clocksource is registered clocksource_watchdog_kthread() will
157 * re-rate and re-select.
158 */
159 if (list_empty(&cs->list)) {
160 cs->rating = 0;
156 return; 161 return;
162 }
157 163
158 if (cs->mark_unstable) 164 if (cs->mark_unstable)
159 cs->mark_unstable(cs); 165 cs->mark_unstable(cs);
160 166
167 /* kick clocksource_watchdog_kthread() */
161 if (finished_booting) 168 if (finished_booting)
162 schedule_work(&watchdog_work); 169 schedule_work(&watchdog_work);
163} 170}