summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-03-04 11:34:49 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2018-03-04 11:34:49 -0800
commit4c4ce3022dc7352d05de4d8e1602c9a2a14458bf (patch)
tree303d93fe80bb913ed780b82c2ef911026db1f170 /kernel
parentff8d583621143d26123ac1e14470de9bd2384a31 (diff)
parentc52232a49e203a65a6e1a670cd5262f59e9364a0 (diff)
downloadlinux-4c4ce3022dc7352d05de4d8e1602c9a2a14458bf.tar.gz
linux-4c4ce3022dc7352d05de4d8e1602c9a2a14458bf.tar.bz2
linux-4c4ce3022dc7352d05de4d8e1602c9a2a14458bf.zip
Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull timer fixes from Thomas Gleixner: "A small set of fixes from the timer departement: - Add a missing timer wheel clock forward when migrating timers off a unplugged CPU to prevent operating on a stale clock base and missing timer deadlines. - Use the proper shift count to extract data from a register value to prevent evaluating unrelated bits - Make the error return check in the FSL timer driver work correctly. Checking an unsigned variable for less than zero does not really work well. - Clarify the confusing comments in the ARC timer code" * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: timers: Forward timer base before migrating timers clocksource/drivers/arc_timer: Update some comments clocksource/drivers/mips-gic-timer: Use correct shift count to extract data clocksource/drivers/fsl_ftm_timer: Fix error return checking
Diffstat (limited to 'kernel')
-rw-r--r--kernel/time/timer.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/kernel/time/timer.c b/kernel/time/timer.c
index 48150ab42de9..4a4fd567fb26 100644
--- a/kernel/time/timer.c
+++ b/kernel/time/timer.c
@@ -1894,6 +1894,12 @@ int timers_dead_cpu(unsigned int cpu)
raw_spin_lock_irq(&new_base->lock);
raw_spin_lock_nested(&old_base->lock, SINGLE_DEPTH_NESTING);
+ /*
+ * The current CPUs base clock might be stale. Update it
+ * before moving the timers over.
+ */
+ forward_timer_base(new_base);
+
BUG_ON(old_base->running_timer);
for (i = 0; i < WHEEL_SIZE; i++)