diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-01-28 15:17:35 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-01-28 15:17:35 -0500 |
commit | 07b0137c0268b8d0694a5f09284449353a1a6fed (patch) | |
tree | d69172d06f3553027ffa7be08e518697b2c58a9f | |
parent | 624441927ff6af871d793dfa49fa347c8450e250 (diff) | |
parent | d5421ea43d30701e03cadc56a38854c36a8b4433 (diff) |
Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull timer fix from Thomas Gleixner:
"A single fix for a ~10 years old problem which causes high resolution
timers to stop after a CPU unplug/plug cycle due to a stale flag in
the per CPU hrtimer base struct.
Paul McKenney was hunting this for about a year, but the heisenbug
nature made it resistant against debug attempts for quite some time"
* 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
hrtimer: Reset hrtimer cpu base proper on CPU hotplug
-rw-r--r-- | kernel/time/hrtimer.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c index d32520840fde..aa9d2a2b1210 100644 --- a/kernel/time/hrtimer.c +++ b/kernel/time/hrtimer.c | |||
@@ -655,7 +655,9 @@ static void hrtimer_reprogram(struct hrtimer *timer, | |||
655 | static inline void hrtimer_init_hres(struct hrtimer_cpu_base *base) | 655 | static inline void hrtimer_init_hres(struct hrtimer_cpu_base *base) |
656 | { | 656 | { |
657 | base->expires_next = KTIME_MAX; | 657 | base->expires_next = KTIME_MAX; |
658 | base->hang_detected = 0; | ||
658 | base->hres_active = 0; | 659 | base->hres_active = 0; |
660 | base->next_timer = NULL; | ||
659 | } | 661 | } |
660 | 662 | ||
661 | /* | 663 | /* |
@@ -1589,6 +1591,7 @@ int hrtimers_prepare_cpu(unsigned int cpu) | |||
1589 | timerqueue_init_head(&cpu_base->clock_base[i].active); | 1591 | timerqueue_init_head(&cpu_base->clock_base[i].active); |
1590 | } | 1592 | } |
1591 | 1593 | ||
1594 | cpu_base->active_bases = 0; | ||
1592 | cpu_base->cpu = cpu; | 1595 | cpu_base->cpu = cpu; |
1593 | hrtimer_init_hres(cpu_base); | 1596 | hrtimer_init_hres(cpu_base); |
1594 | return 0; | 1597 | return 0; |