summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/time/tick-sched.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
index 4012da672821..6737d68fdb8d 100644
--- a/kernel/time/tick-sched.c
+++ b/kernel/time/tick-sched.c
@@ -639,9 +639,15 @@ static enum hrtimer_restart tick_sched_timer(struct hrtimer *timer)
* into a long sleep. If two cpus happen to assign themself to
* this duty, then the jiffies update is still serialized by
* xtime_lock.
+ *
+ * Also check if the do_timer duty is stuck with off-line cpu.
+ * Then, use the same remedy as for dropped duty: re-assign it
+ * to the cpu servicing this tick.
*/
- if (unlikely(tick_do_timer_cpu == TICK_DO_TIMER_NONE))
+ if ((unlikely(tick_do_timer_cpu == TICK_DO_TIMER_NONE)) ||
+ (!cpu_online(tick_do_timer_cpu))) {
tick_do_timer_cpu = cpu;
+ }
#endif
/* Check, if the jiffies need an update */