diff options
author | Christoph Lameter <cl@linux.com> | 2014-08-17 13:30:26 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2014-08-26 13:45:44 -0400 |
commit | dc5df73b3afffc8d042dadffc1c959008b2c1163 (patch) | |
tree | 6aaafb2da2555ffc45cc6966783a22ed8125532c /kernel | |
parent | 22127e93c587afa01e4f7225d2d1cf1d26ae7dfe (diff) |
time: Convert a bunch of &__get_cpu_var introduced in the 3.16 merge period
Signed-off-by: Christoph Lameter <cl@linux.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/time/hrtimer.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c index 5f2229ba53d6..a50600d87fb7 100644 --- a/kernel/time/hrtimer.c +++ b/kernel/time/hrtimer.c | |||
@@ -558,7 +558,7 @@ hrtimer_force_reprogram(struct hrtimer_cpu_base *cpu_base, int skip_equal) | |||
558 | static int hrtimer_reprogram(struct hrtimer *timer, | 558 | static int hrtimer_reprogram(struct hrtimer *timer, |
559 | struct hrtimer_clock_base *base) | 559 | struct hrtimer_clock_base *base) |
560 | { | 560 | { |
561 | struct hrtimer_cpu_base *cpu_base = &__get_cpu_var(hrtimer_bases); | 561 | struct hrtimer_cpu_base *cpu_base = this_cpu_ptr(&hrtimer_bases); |
562 | ktime_t expires = ktime_sub(hrtimer_get_expires(timer), base->offset); | 562 | ktime_t expires = ktime_sub(hrtimer_get_expires(timer), base->offset); |
563 | int res; | 563 | int res; |
564 | 564 | ||
@@ -629,7 +629,7 @@ static inline ktime_t hrtimer_update_base(struct hrtimer_cpu_base *base) | |||
629 | */ | 629 | */ |
630 | static void retrigger_next_event(void *arg) | 630 | static void retrigger_next_event(void *arg) |
631 | { | 631 | { |
632 | struct hrtimer_cpu_base *base = &__get_cpu_var(hrtimer_bases); | 632 | struct hrtimer_cpu_base *base = this_cpu_ptr(&hrtimer_bases); |
633 | 633 | ||
634 | if (!hrtimer_hres_active()) | 634 | if (!hrtimer_hres_active()) |
635 | return; | 635 | return; |
@@ -903,7 +903,7 @@ remove_hrtimer(struct hrtimer *timer, struct hrtimer_clock_base *base) | |||
903 | */ | 903 | */ |
904 | debug_deactivate(timer); | 904 | debug_deactivate(timer); |
905 | timer_stats_hrtimer_clear_start_info(timer); | 905 | timer_stats_hrtimer_clear_start_info(timer); |
906 | reprogram = base->cpu_base == &__get_cpu_var(hrtimer_bases); | 906 | reprogram = base->cpu_base == this_cpu_ptr(&hrtimer_bases); |
907 | /* | 907 | /* |
908 | * We must preserve the CALLBACK state flag here, | 908 | * We must preserve the CALLBACK state flag here, |
909 | * otherwise we could move the timer base in | 909 | * otherwise we could move the timer base in |
@@ -963,7 +963,7 @@ int __hrtimer_start_range_ns(struct hrtimer *timer, ktime_t tim, | |||
963 | * on dynticks target. | 963 | * on dynticks target. |
964 | */ | 964 | */ |
965 | wake_up_nohz_cpu(new_base->cpu_base->cpu); | 965 | wake_up_nohz_cpu(new_base->cpu_base->cpu); |
966 | } else if (new_base->cpu_base == &__get_cpu_var(hrtimer_bases) && | 966 | } else if (new_base->cpu_base == this_cpu_ptr(&hrtimer_bases) && |
967 | hrtimer_reprogram(timer, new_base)) { | 967 | hrtimer_reprogram(timer, new_base)) { |
968 | /* | 968 | /* |
969 | * Only allow reprogramming if the new base is on this CPU. | 969 | * Only allow reprogramming if the new base is on this CPU. |
@@ -1103,7 +1103,7 @@ EXPORT_SYMBOL_GPL(hrtimer_get_remaining); | |||
1103 | */ | 1103 | */ |
1104 | ktime_t hrtimer_get_next_event(void) | 1104 | ktime_t hrtimer_get_next_event(void) |
1105 | { | 1105 | { |
1106 | struct hrtimer_cpu_base *cpu_base = &__get_cpu_var(hrtimer_bases); | 1106 | struct hrtimer_cpu_base *cpu_base = this_cpu_ptr(&hrtimer_bases); |
1107 | struct hrtimer_clock_base *base = cpu_base->clock_base; | 1107 | struct hrtimer_clock_base *base = cpu_base->clock_base; |
1108 | ktime_t delta, mindelta = { .tv64 = KTIME_MAX }; | 1108 | ktime_t delta, mindelta = { .tv64 = KTIME_MAX }; |
1109 | unsigned long flags; | 1109 | unsigned long flags; |
@@ -1242,7 +1242,7 @@ static void __run_hrtimer(struct hrtimer *timer, ktime_t *now) | |||
1242 | */ | 1242 | */ |
1243 | void hrtimer_interrupt(struct clock_event_device *dev) | 1243 | void hrtimer_interrupt(struct clock_event_device *dev) |
1244 | { | 1244 | { |
1245 | struct hrtimer_cpu_base *cpu_base = &__get_cpu_var(hrtimer_bases); | 1245 | struct hrtimer_cpu_base *cpu_base = this_cpu_ptr(&hrtimer_bases); |
1246 | ktime_t expires_next, now, entry_time, delta; | 1246 | ktime_t expires_next, now, entry_time, delta; |
1247 | int i, retries = 0; | 1247 | int i, retries = 0; |
1248 | 1248 | ||
@@ -1440,7 +1440,7 @@ void hrtimer_run_pending(void) | |||
1440 | void hrtimer_run_queues(void) | 1440 | void hrtimer_run_queues(void) |
1441 | { | 1441 | { |
1442 | struct timerqueue_node *node; | 1442 | struct timerqueue_node *node; |
1443 | struct hrtimer_cpu_base *cpu_base = &__get_cpu_var(hrtimer_bases); | 1443 | struct hrtimer_cpu_base *cpu_base = this_cpu_ptr(&hrtimer_bases); |
1444 | struct hrtimer_clock_base *base; | 1444 | struct hrtimer_clock_base *base; |
1445 | int index, gettime = 1; | 1445 | int index, gettime = 1; |
1446 | 1446 | ||
@@ -1679,7 +1679,7 @@ static void migrate_hrtimers(int scpu) | |||
1679 | 1679 | ||
1680 | local_irq_disable(); | 1680 | local_irq_disable(); |
1681 | old_base = &per_cpu(hrtimer_bases, scpu); | 1681 | old_base = &per_cpu(hrtimer_bases, scpu); |
1682 | new_base = &__get_cpu_var(hrtimer_bases); | 1682 | new_base = this_cpu_ptr(&hrtimer_bases); |
1683 | /* | 1683 | /* |
1684 | * The caller is globally serialized and nobody else | 1684 | * The caller is globally serialized and nobody else |
1685 | * takes two locks at once, deadlock is not possible. | 1685 | * takes two locks at once, deadlock is not possible. |