Commit dc5df73b authored by Christoph Lameter's avatar Christoph Lameter Committed by Tejun Heo

time: Convert a bunch of &__get_cpu_var introduced in the 3.16 merge period

Signed-off-by: default avatarChristoph Lameter <cl@linux.com>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
parent 22127e93
...@@ -558,7 +558,7 @@ hrtimer_force_reprogram(struct hrtimer_cpu_base *cpu_base, int skip_equal) ...@@ -558,7 +558,7 @@ hrtimer_force_reprogram(struct hrtimer_cpu_base *cpu_base, int skip_equal)
static int hrtimer_reprogram(struct hrtimer *timer, static int hrtimer_reprogram(struct hrtimer *timer,
struct hrtimer_clock_base *base) struct hrtimer_clock_base *base)
{ {
struct hrtimer_cpu_base *cpu_base = &__get_cpu_var(hrtimer_bases); struct hrtimer_cpu_base *cpu_base = this_cpu_ptr(&hrtimer_bases);
ktime_t expires = ktime_sub(hrtimer_get_expires(timer), base->offset); ktime_t expires = ktime_sub(hrtimer_get_expires(timer), base->offset);
int res; int res;
...@@ -629,7 +629,7 @@ static inline ktime_t hrtimer_update_base(struct hrtimer_cpu_base *base) ...@@ -629,7 +629,7 @@ static inline ktime_t hrtimer_update_base(struct hrtimer_cpu_base *base)
*/ */
static void retrigger_next_event(void *arg) static void retrigger_next_event(void *arg)
{ {
struct hrtimer_cpu_base *base = &__get_cpu_var(hrtimer_bases); struct hrtimer_cpu_base *base = this_cpu_ptr(&hrtimer_bases);
if (!hrtimer_hres_active()) if (!hrtimer_hres_active())
return; return;
...@@ -903,7 +903,7 @@ remove_hrtimer(struct hrtimer *timer, struct hrtimer_clock_base *base) ...@@ -903,7 +903,7 @@ remove_hrtimer(struct hrtimer *timer, struct hrtimer_clock_base *base)
*/ */
debug_deactivate(timer); debug_deactivate(timer);
timer_stats_hrtimer_clear_start_info(timer); timer_stats_hrtimer_clear_start_info(timer);
reprogram = base->cpu_base == &__get_cpu_var(hrtimer_bases); reprogram = base->cpu_base == this_cpu_ptr(&hrtimer_bases);
/* /*
* We must preserve the CALLBACK state flag here, * We must preserve the CALLBACK state flag here,
* otherwise we could move the timer base in * otherwise we could move the timer base in
...@@ -963,7 +963,7 @@ int __hrtimer_start_range_ns(struct hrtimer *timer, ktime_t tim, ...@@ -963,7 +963,7 @@ int __hrtimer_start_range_ns(struct hrtimer *timer, ktime_t tim,
* on dynticks target. * on dynticks target.
*/ */
wake_up_nohz_cpu(new_base->cpu_base->cpu); wake_up_nohz_cpu(new_base->cpu_base->cpu);
} else if (new_base->cpu_base == &__get_cpu_var(hrtimer_bases) && } else if (new_base->cpu_base == this_cpu_ptr(&hrtimer_bases) &&
hrtimer_reprogram(timer, new_base)) { hrtimer_reprogram(timer, new_base)) {
/* /*
* Only allow reprogramming if the new base is on this CPU. * Only allow reprogramming if the new base is on this CPU.
...@@ -1103,7 +1103,7 @@ EXPORT_SYMBOL_GPL(hrtimer_get_remaining); ...@@ -1103,7 +1103,7 @@ EXPORT_SYMBOL_GPL(hrtimer_get_remaining);
*/ */
ktime_t hrtimer_get_next_event(void) ktime_t hrtimer_get_next_event(void)
{ {
struct hrtimer_cpu_base *cpu_base = &__get_cpu_var(hrtimer_bases); struct hrtimer_cpu_base *cpu_base = this_cpu_ptr(&hrtimer_bases);
struct hrtimer_clock_base *base = cpu_base->clock_base; struct hrtimer_clock_base *base = cpu_base->clock_base;
ktime_t delta, mindelta = { .tv64 = KTIME_MAX }; ktime_t delta, mindelta = { .tv64 = KTIME_MAX };
unsigned long flags; unsigned long flags;
...@@ -1242,7 +1242,7 @@ static void __run_hrtimer(struct hrtimer *timer, ktime_t *now) ...@@ -1242,7 +1242,7 @@ static void __run_hrtimer(struct hrtimer *timer, ktime_t *now)
*/ */
void hrtimer_interrupt(struct clock_event_device *dev) void hrtimer_interrupt(struct clock_event_device *dev)
{ {
struct hrtimer_cpu_base *cpu_base = &__get_cpu_var(hrtimer_bases); struct hrtimer_cpu_base *cpu_base = this_cpu_ptr(&hrtimer_bases);
ktime_t expires_next, now, entry_time, delta; ktime_t expires_next, now, entry_time, delta;
int i, retries = 0; int i, retries = 0;
...@@ -1440,7 +1440,7 @@ void hrtimer_run_pending(void) ...@@ -1440,7 +1440,7 @@ void hrtimer_run_pending(void)
void hrtimer_run_queues(void) void hrtimer_run_queues(void)
{ {
struct timerqueue_node *node; struct timerqueue_node *node;
struct hrtimer_cpu_base *cpu_base = &__get_cpu_var(hrtimer_bases); struct hrtimer_cpu_base *cpu_base = this_cpu_ptr(&hrtimer_bases);
struct hrtimer_clock_base *base; struct hrtimer_clock_base *base;
int index, gettime = 1; int index, gettime = 1;
...@@ -1679,7 +1679,7 @@ static void migrate_hrtimers(int scpu) ...@@ -1679,7 +1679,7 @@ static void migrate_hrtimers(int scpu)
local_irq_disable(); local_irq_disable();
old_base = &per_cpu(hrtimer_bases, scpu); old_base = &per_cpu(hrtimer_bases, scpu);
new_base = &__get_cpu_var(hrtimer_bases); new_base = this_cpu_ptr(&hrtimer_bases);
/* /*
* The caller is globally serialized and nobody else * The caller is globally serialized and nobody else
* takes two locks at once, deadlock is not possible. * takes two locks at once, deadlock is not possible.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment