diff options
Diffstat (limited to 'kernel/hrtimer.c')
-rw-r--r-- | kernel/hrtimer.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c index 5c69e996bd0f..ce669174f355 100644 --- a/kernel/hrtimer.c +++ b/kernel/hrtimer.c | |||
@@ -90,7 +90,7 @@ static void hrtimer_get_softirq_time(struct hrtimer_cpu_base *base) | |||
90 | do { | 90 | do { |
91 | seq = read_seqbegin(&xtime_lock); | 91 | seq = read_seqbegin(&xtime_lock); |
92 | xts = __current_kernel_time(); | 92 | xts = __current_kernel_time(); |
93 | tom = wall_to_monotonic; | 93 | tom = __get_wall_to_monotonic(); |
94 | } while (read_seqretry(&xtime_lock, seq)); | 94 | } while (read_seqretry(&xtime_lock, seq)); |
95 | 95 | ||
96 | xtim = timespec_to_ktime(xts); | 96 | xtim = timespec_to_ktime(xts); |
@@ -144,12 +144,8 @@ struct hrtimer_clock_base *lock_hrtimer_base(const struct hrtimer *timer, | |||
144 | static int hrtimer_get_target(int this_cpu, int pinned) | 144 | static int hrtimer_get_target(int this_cpu, int pinned) |
145 | { | 145 | { |
146 | #ifdef CONFIG_NO_HZ | 146 | #ifdef CONFIG_NO_HZ |
147 | if (!pinned && get_sysctl_timer_migration() && idle_cpu(this_cpu)) { | 147 | if (!pinned && get_sysctl_timer_migration() && idle_cpu(this_cpu)) |
148 | int preferred_cpu = get_nohz_load_balancer(); | 148 | return get_nohz_timer_target(); |
149 | |||
150 | if (preferred_cpu >= 0) | ||
151 | return preferred_cpu; | ||
152 | } | ||
153 | #endif | 149 | #endif |
154 | return this_cpu; | 150 | return this_cpu; |
155 | } | 151 | } |
@@ -612,7 +608,7 @@ static int hrtimer_reprogram(struct hrtimer *timer, | |||
612 | static void retrigger_next_event(void *arg) | 608 | static void retrigger_next_event(void *arg) |
613 | { | 609 | { |
614 | struct hrtimer_cpu_base *base; | 610 | struct hrtimer_cpu_base *base; |
615 | struct timespec realtime_offset; | 611 | struct timespec realtime_offset, wtm; |
616 | unsigned long seq; | 612 | unsigned long seq; |
617 | 613 | ||
618 | if (!hrtimer_hres_active()) | 614 | if (!hrtimer_hres_active()) |
@@ -620,10 +616,9 @@ static void retrigger_next_event(void *arg) | |||
620 | 616 | ||
621 | do { | 617 | do { |
622 | seq = read_seqbegin(&xtime_lock); | 618 | seq = read_seqbegin(&xtime_lock); |
623 | set_normalized_timespec(&realtime_offset, | 619 | wtm = __get_wall_to_monotonic(); |
624 | -wall_to_monotonic.tv_sec, | ||
625 | -wall_to_monotonic.tv_nsec); | ||
626 | } while (read_seqretry(&xtime_lock, seq)); | 620 | } while (read_seqretry(&xtime_lock, seq)); |
621 | set_normalized_timespec(&realtime_offset, -wtm.tv_sec, -wtm.tv_nsec); | ||
627 | 622 | ||
628 | base = &__get_cpu_var(hrtimer_bases); | 623 | base = &__get_cpu_var(hrtimer_bases); |
629 | 624 | ||