diff options
Diffstat (limited to 'kernel/time/hrtimer.c')
-rw-r--r-- | kernel/time/hrtimer.c | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c index 0e32d4e7583f..f9007478fcce 100644 --- a/kernel/time/hrtimer.c +++ b/kernel/time/hrtimer.c | |||
@@ -1013,14 +1013,25 @@ int __hrtimer_start_range_ns(struct hrtimer *timer, ktime_t tim, | |||
1013 | 1013 | ||
1014 | leftmost = enqueue_hrtimer(timer, new_base); | 1014 | leftmost = enqueue_hrtimer(timer, new_base); |
1015 | 1015 | ||
1016 | /* | 1016 | if (!leftmost) { |
1017 | * Only allow reprogramming if the new base is on this CPU. | 1017 | unlock_hrtimer_base(timer, &flags); |
1018 | * (it might still be on another CPU if the timer was pending) | 1018 | return ret; |
1019 | * | 1019 | } |
1020 | * XXX send_remote_softirq() ? | 1020 | |
1021 | */ | 1021 | if (!hrtimer_is_hres_active(timer)) { |
1022 | if (leftmost && new_base->cpu_base == &__get_cpu_var(hrtimer_bases) | 1022 | /* |
1023 | && hrtimer_enqueue_reprogram(timer, new_base)) { | 1023 | * Kick to reschedule the next tick to handle the new timer |
1024 | * on dynticks target. | ||
1025 | */ | ||
1026 | wake_up_nohz_cpu(new_base->cpu_base->cpu); | ||
1027 | } else if (new_base->cpu_base == &__get_cpu_var(hrtimer_bases) && | ||
1028 | hrtimer_enqueue_reprogram(timer, new_base)) { | ||
1029 | /* | ||
1030 | * Only allow reprogramming if the new base is on this CPU. | ||
1031 | * (it might still be on another CPU if the timer was pending) | ||
1032 | * | ||
1033 | * XXX send_remote_softirq() ? | ||
1034 | */ | ||
1024 | if (wakeup) { | 1035 | if (wakeup) { |
1025 | /* | 1036 | /* |
1026 | * We need to drop cpu_base->lock to avoid a | 1037 | * We need to drop cpu_base->lock to avoid a |