|
@@ -1013,14 +1013,25 @@ int __hrtimer_start_range_ns(struct hrtimer *timer, ktime_t tim,
|
|
|
|
|
|
leftmost = enqueue_hrtimer(timer, new_base);
|
|
|
|
|
|
- /*
|
|
|
- * Only allow reprogramming if the new base is on this CPU.
|
|
|
- * (it might still be on another CPU if the timer was pending)
|
|
|
- *
|
|
|
- * XXX send_remote_softirq() ?
|
|
|
- */
|
|
|
- if (leftmost && new_base->cpu_base == &__get_cpu_var(hrtimer_bases)
|
|
|
- && hrtimer_enqueue_reprogram(timer, new_base)) {
|
|
|
+ if (!leftmost) {
|
|
|
+ unlock_hrtimer_base(timer, &flags);
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!hrtimer_is_hres_active(timer)) {
|
|
|
+ /*
|
|
|
+ * Kick to reschedule the next tick to handle the new timer
|
|
|
+ * on dynticks target.
|
|
|
+ */
|
|
|
+ wake_up_nohz_cpu(new_base->cpu_base->cpu);
|
|
|
+ } else if (new_base->cpu_base == &__get_cpu_var(hrtimer_bases) &&
|
|
|
+ hrtimer_enqueue_reprogram(timer, new_base)) {
|
|
|
+ /*
|
|
|
+ * Only allow reprogramming if the new base is on this CPU.
|
|
|
+ * (it might still be on another CPU if the timer was pending)
|
|
|
+ *
|
|
|
+ * XXX send_remote_softirq() ?
|
|
|
+ */
|
|
|
if (wakeup) {
|
|
|
/*
|
|
|
* We need to drop cpu_base->lock to avoid a
|