@@ -558,7 +558,7 @@ hrtimer_force_reprogram(struct hrtimer_cpu_base *cpu_base, int skip_equal)
558558static int hrtimer_reprogram (struct hrtimer * timer ,
559559 struct hrtimer_clock_base * base )
560560{
561- struct hrtimer_cpu_base * cpu_base = & __get_cpu_var ( hrtimer_bases );
561+ struct hrtimer_cpu_base * cpu_base = this_cpu_ptr ( & hrtimer_bases );
562562 ktime_t expires = ktime_sub (hrtimer_get_expires (timer ), base -> offset );
563563 int res ;
564564
@@ -629,7 +629,7 @@ static inline ktime_t hrtimer_update_base(struct hrtimer_cpu_base *base)
629629 */
630630static void retrigger_next_event (void * arg )
631631{
632- struct hrtimer_cpu_base * base = & __get_cpu_var ( hrtimer_bases );
632+ struct hrtimer_cpu_base * base = this_cpu_ptr ( & hrtimer_bases );
633633
634634 if (!hrtimer_hres_active ())
635635 return ;
@@ -903,7 +903,7 @@ remove_hrtimer(struct hrtimer *timer, struct hrtimer_clock_base *base)
903903 */
904904 debug_deactivate (timer );
905905 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 );
907907 /*
908908 * We must preserve the CALLBACK state flag here,
909909 * otherwise we could move the timer base in
@@ -963,7 +963,7 @@ int __hrtimer_start_range_ns(struct hrtimer *timer, ktime_t tim,
963963 * on dynticks target.
964964 */
965965 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 ) &&
967967 hrtimer_reprogram (timer , new_base )) {
968968 /*
969969 * Only allow reprogramming if the new base is on this CPU.
@@ -1103,7 +1103,7 @@ EXPORT_SYMBOL_GPL(hrtimer_get_remaining);
11031103 */
11041104ktime_t hrtimer_get_next_event (void )
11051105{
1106- struct hrtimer_cpu_base * cpu_base = & __get_cpu_var ( hrtimer_bases );
1106+ struct hrtimer_cpu_base * cpu_base = this_cpu_ptr ( & hrtimer_bases );
11071107 struct hrtimer_clock_base * base = cpu_base -> clock_base ;
11081108 ktime_t delta , mindelta = { .tv64 = KTIME_MAX };
11091109 unsigned long flags ;
@@ -1242,7 +1242,7 @@ static void __run_hrtimer(struct hrtimer *timer, ktime_t *now)
12421242 */
12431243void hrtimer_interrupt (struct clock_event_device * dev )
12441244{
1245- struct hrtimer_cpu_base * cpu_base = & __get_cpu_var ( hrtimer_bases );
1245+ struct hrtimer_cpu_base * cpu_base = this_cpu_ptr ( & hrtimer_bases );
12461246 ktime_t expires_next , now , entry_time , delta ;
12471247 int i , retries = 0 ;
12481248
@@ -1440,7 +1440,7 @@ void hrtimer_run_pending(void)
14401440void hrtimer_run_queues (void )
14411441{
14421442 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 );
14441444 struct hrtimer_clock_base * base ;
14451445 int index , gettime = 1 ;
14461446
@@ -1679,7 +1679,7 @@ static void migrate_hrtimers(int scpu)
16791679
16801680 local_irq_disable ();
16811681 old_base = & per_cpu (hrtimer_bases , scpu );
1682- new_base = & __get_cpu_var ( hrtimer_bases );
1682+ new_base = this_cpu_ptr ( & hrtimer_bases );
16831683 /*
16841684 * The caller is globally serialized and nobody else
16851685 * takes two locks at once, deadlock is not possible.
0 commit comments