diff options
-rw-r--r-- | drivers/clocksource/dummy_timer.c | 2 | ||||
-rw-r--r-- | kernel/irq_work.c | 12 | ||||
-rw-r--r-- | kernel/sched/clock.c | 2 | ||||
-rw-r--r-- | kernel/softirq.c | 4 | ||||
-rw-r--r-- | kernel/time/hrtimer.c | 6 | ||||
-rw-r--r-- | kernel/time/tick-broadcast.c | 2 | ||||
-rw-r--r-- | kernel/time/tick-common.c | 6 | ||||
-rw-r--r-- | kernel/time/tick-oneshot.c | 2 | ||||
-rw-r--r-- | kernel/time/tick-sched.c | 20 | ||||
-rw-r--r-- | kernel/time/timer.c | 2 |
10 files changed, 29 insertions, 29 deletions
diff --git a/drivers/clocksource/dummy_timer.c b/drivers/clocksource/dummy_timer.c index ad3572541728..31990600fcff 100644 --- a/drivers/clocksource/dummy_timer.c +++ b/drivers/clocksource/dummy_timer.c | |||
@@ -28,7 +28,7 @@ static void dummy_timer_set_mode(enum clock_event_mode mode, | |||
28 | static void dummy_timer_setup(void) | 28 | static void dummy_timer_setup(void) |
29 | { | 29 | { |
30 | int cpu = smp_processor_id(); | 30 | int cpu = smp_processor_id(); |
31 | struct clock_event_device *evt = __this_cpu_ptr(&dummy_timer_evt); | 31 | struct clock_event_device *evt = raw_cpu_ptr(&dummy_timer_evt); |
32 | 32 | ||
33 | evt->name = "dummy_timer"; | 33 | evt->name = "dummy_timer"; |
34 | evt->features = CLOCK_EVT_FEAT_PERIODIC | | 34 | evt->features = CLOCK_EVT_FEAT_PERIODIC | |
diff --git a/kernel/irq_work.c b/kernel/irq_work.c index e6bcbe756663..345d19edcdae 100644 --- a/kernel/irq_work.c +++ b/kernel/irq_work.c | |||
@@ -95,11 +95,11 @@ bool irq_work_queue(struct irq_work *work) | |||
95 | 95 | ||
96 | /* If the work is "lazy", handle it from next tick if any */ | 96 | /* If the work is "lazy", handle it from next tick if any */ |
97 | if (work->flags & IRQ_WORK_LAZY) { | 97 | if (work->flags & IRQ_WORK_LAZY) { |
98 | if (llist_add(&work->llnode, &__get_cpu_var(lazy_list)) && | 98 | if (llist_add(&work->llnode, this_cpu_ptr(&lazy_list)) && |
99 | tick_nohz_tick_stopped()) | 99 | tick_nohz_tick_stopped()) |
100 | arch_irq_work_raise(); | 100 | arch_irq_work_raise(); |
101 | } else { | 101 | } else { |
102 | if (llist_add(&work->llnode, &__get_cpu_var(raised_list))) | 102 | if (llist_add(&work->llnode, this_cpu_ptr(&raised_list))) |
103 | arch_irq_work_raise(); | 103 | arch_irq_work_raise(); |
104 | } | 104 | } |
105 | 105 | ||
@@ -113,8 +113,8 @@ bool irq_work_needs_cpu(void) | |||
113 | { | 113 | { |
114 | struct llist_head *raised, *lazy; | 114 | struct llist_head *raised, *lazy; |
115 | 115 | ||
116 | raised = &__get_cpu_var(raised_list); | 116 | raised = this_cpu_ptr(&raised_list); |
117 | lazy = &__get_cpu_var(lazy_list); | 117 | lazy = this_cpu_ptr(&lazy_list); |
118 | if (llist_empty(raised) && llist_empty(lazy)) | 118 | if (llist_empty(raised) && llist_empty(lazy)) |
119 | return false; | 119 | return false; |
120 | 120 | ||
@@ -166,8 +166,8 @@ static void irq_work_run_list(struct llist_head *list) | |||
166 | */ | 166 | */ |
167 | void irq_work_run(void) | 167 | void irq_work_run(void) |
168 | { | 168 | { |
169 | irq_work_run_list(&__get_cpu_var(raised_list)); | 169 | irq_work_run_list(this_cpu_ptr(&raised_list)); |
170 | irq_work_run_list(&__get_cpu_var(lazy_list)); | 170 | irq_work_run_list(this_cpu_ptr(&lazy_list)); |
171 | } | 171 | } |
172 | EXPORT_SYMBOL_GPL(irq_work_run); | 172 | EXPORT_SYMBOL_GPL(irq_work_run); |
173 | 173 | ||
diff --git a/kernel/sched/clock.c b/kernel/sched/clock.c index 3ef6451e972e..c27e4f8f4879 100644 --- a/kernel/sched/clock.c +++ b/kernel/sched/clock.c | |||
@@ -134,7 +134,7 @@ static DEFINE_PER_CPU_SHARED_ALIGNED(struct sched_clock_data, sched_clock_data); | |||
134 | 134 | ||
135 | static inline struct sched_clock_data *this_scd(void) | 135 | static inline struct sched_clock_data *this_scd(void) |
136 | { | 136 | { |
137 | return &__get_cpu_var(sched_clock_data); | 137 | return this_cpu_ptr(&sched_clock_data); |
138 | } | 138 | } |
139 | 139 | ||
140 | static inline struct sched_clock_data *cpu_sdc(int cpu) | 140 | static inline struct sched_clock_data *cpu_sdc(int cpu) |
diff --git a/kernel/softirq.c b/kernel/softirq.c index 5918d227730f..2d44b5714fe6 100644 --- a/kernel/softirq.c +++ b/kernel/softirq.c | |||
@@ -485,7 +485,7 @@ static void tasklet_action(struct softirq_action *a) | |||
485 | local_irq_disable(); | 485 | local_irq_disable(); |
486 | list = __this_cpu_read(tasklet_vec.head); | 486 | list = __this_cpu_read(tasklet_vec.head); |
487 | __this_cpu_write(tasklet_vec.head, NULL); | 487 | __this_cpu_write(tasklet_vec.head, NULL); |
488 | __this_cpu_write(tasklet_vec.tail, &__get_cpu_var(tasklet_vec).head); | 488 | __this_cpu_write(tasklet_vec.tail, this_cpu_ptr(&tasklet_vec.head)); |
489 | local_irq_enable(); | 489 | local_irq_enable(); |
490 | 490 | ||
491 | while (list) { | 491 | while (list) { |
@@ -521,7 +521,7 @@ static void tasklet_hi_action(struct softirq_action *a) | |||
521 | local_irq_disable(); | 521 | local_irq_disable(); |
522 | list = __this_cpu_read(tasklet_hi_vec.head); | 522 | list = __this_cpu_read(tasklet_hi_vec.head); |
523 | __this_cpu_write(tasklet_hi_vec.head, NULL); | 523 | __this_cpu_write(tasklet_hi_vec.head, NULL); |
524 | __this_cpu_write(tasklet_hi_vec.tail, &__get_cpu_var(tasklet_hi_vec).head); | 524 | __this_cpu_write(tasklet_hi_vec.tail, this_cpu_ptr(&tasklet_hi_vec.head)); |
525 | local_irq_enable(); | 525 | local_irq_enable(); |
526 | 526 | ||
527 | while (list) { | 527 | while (list) { |
diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c index 1c2fe7de2842..5f2229ba53d6 100644 --- a/kernel/time/hrtimer.c +++ b/kernel/time/hrtimer.c | |||
@@ -1144,7 +1144,7 @@ static void __hrtimer_init(struct hrtimer *timer, clockid_t clock_id, | |||
1144 | 1144 | ||
1145 | memset(timer, 0, sizeof(struct hrtimer)); | 1145 | memset(timer, 0, sizeof(struct hrtimer)); |
1146 | 1146 | ||
1147 | cpu_base = &__raw_get_cpu_var(hrtimer_bases); | 1147 | cpu_base = raw_cpu_ptr(&hrtimer_bases); |
1148 | 1148 | ||
1149 | if (clock_id == CLOCK_REALTIME && mode != HRTIMER_MODE_ABS) | 1149 | if (clock_id == CLOCK_REALTIME && mode != HRTIMER_MODE_ABS) |
1150 | clock_id = CLOCK_MONOTONIC; | 1150 | clock_id = CLOCK_MONOTONIC; |
@@ -1187,7 +1187,7 @@ int hrtimer_get_res(const clockid_t which_clock, struct timespec *tp) | |||
1187 | struct hrtimer_cpu_base *cpu_base; | 1187 | struct hrtimer_cpu_base *cpu_base; |
1188 | int base = hrtimer_clockid_to_base(which_clock); | 1188 | int base = hrtimer_clockid_to_base(which_clock); |
1189 | 1189 | ||
1190 | cpu_base = &__raw_get_cpu_var(hrtimer_bases); | 1190 | cpu_base = raw_cpu_ptr(&hrtimer_bases); |
1191 | *tp = ktime_to_timespec(cpu_base->clock_base[base].resolution); | 1191 | *tp = ktime_to_timespec(cpu_base->clock_base[base].resolution); |
1192 | 1192 | ||
1193 | return 0; | 1193 | return 0; |
@@ -1376,7 +1376,7 @@ static void __hrtimer_peek_ahead_timers(void) | |||
1376 | if (!hrtimer_hres_active()) | 1376 | if (!hrtimer_hres_active()) |
1377 | return; | 1377 | return; |
1378 | 1378 | ||
1379 | td = &__get_cpu_var(tick_cpu_device); | 1379 | td = this_cpu_ptr(&tick_cpu_device); |
1380 | if (td && td->evtdev) | 1380 | if (td && td->evtdev) |
1381 | hrtimer_interrupt(td->evtdev); | 1381 | hrtimer_interrupt(td->evtdev); |
1382 | } | 1382 | } |
diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c index 64c5990fd500..066f0ec05e48 100644 --- a/kernel/time/tick-broadcast.c +++ b/kernel/time/tick-broadcast.c | |||
@@ -554,7 +554,7 @@ int tick_resume_broadcast_oneshot(struct clock_event_device *bc) | |||
554 | void tick_check_oneshot_broadcast_this_cpu(void) | 554 | void tick_check_oneshot_broadcast_this_cpu(void) |
555 | { | 555 | { |
556 | if (cpumask_test_cpu(smp_processor_id(), tick_broadcast_oneshot_mask)) { | 556 | if (cpumask_test_cpu(smp_processor_id(), tick_broadcast_oneshot_mask)) { |
557 | struct tick_device *td = &__get_cpu_var(tick_cpu_device); | 557 | struct tick_device *td = this_cpu_ptr(&tick_cpu_device); |
558 | 558 | ||
559 | /* | 559 | /* |
560 | * We might be in the middle of switching over from | 560 | * We might be in the middle of switching over from |
diff --git a/kernel/time/tick-common.c b/kernel/time/tick-common.c index 0a0608edeb26..decfb5f6edb0 100644 --- a/kernel/time/tick-common.c +++ b/kernel/time/tick-common.c | |||
@@ -224,7 +224,7 @@ static void tick_setup_device(struct tick_device *td, | |||
224 | 224 | ||
225 | void tick_install_replacement(struct clock_event_device *newdev) | 225 | void tick_install_replacement(struct clock_event_device *newdev) |
226 | { | 226 | { |
227 | struct tick_device *td = &__get_cpu_var(tick_cpu_device); | 227 | struct tick_device *td = this_cpu_ptr(&tick_cpu_device); |
228 | int cpu = smp_processor_id(); | 228 | int cpu = smp_processor_id(); |
229 | 229 | ||
230 | clockevents_exchange_device(td->evtdev, newdev); | 230 | clockevents_exchange_device(td->evtdev, newdev); |
@@ -374,14 +374,14 @@ void tick_shutdown(unsigned int *cpup) | |||
374 | 374 | ||
375 | void tick_suspend(void) | 375 | void tick_suspend(void) |
376 | { | 376 | { |
377 | struct tick_device *td = &__get_cpu_var(tick_cpu_device); | 377 | struct tick_device *td = this_cpu_ptr(&tick_cpu_device); |
378 | 378 | ||
379 | clockevents_shutdown(td->evtdev); | 379 | clockevents_shutdown(td->evtdev); |
380 | } | 380 | } |
381 | 381 | ||
382 | void tick_resume(void) | 382 | void tick_resume(void) |
383 | { | 383 | { |
384 | struct tick_device *td = &__get_cpu_var(tick_cpu_device); | 384 | struct tick_device *td = this_cpu_ptr(&tick_cpu_device); |
385 | int broadcast = tick_resume_broadcast(); | 385 | int broadcast = tick_resume_broadcast(); |
386 | 386 | ||
387 | clockevents_set_mode(td->evtdev, CLOCK_EVT_MODE_RESUME); | 387 | clockevents_set_mode(td->evtdev, CLOCK_EVT_MODE_RESUME); |
diff --git a/kernel/time/tick-oneshot.c b/kernel/time/tick-oneshot.c index 824109060a33..7ce740e78e1b 100644 --- a/kernel/time/tick-oneshot.c +++ b/kernel/time/tick-oneshot.c | |||
@@ -59,7 +59,7 @@ void tick_setup_oneshot(struct clock_event_device *newdev, | |||
59 | */ | 59 | */ |
60 | int tick_switch_to_oneshot(void (*handler)(struct clock_event_device *)) | 60 | int tick_switch_to_oneshot(void (*handler)(struct clock_event_device *)) |
61 | { | 61 | { |
62 | struct tick_device *td = &__get_cpu_var(tick_cpu_device); | 62 | struct tick_device *td = this_cpu_ptr(&tick_cpu_device); |
63 | struct clock_event_device *dev = td->evtdev; | 63 | struct clock_event_device *dev = td->evtdev; |
64 | 64 | ||
65 | if (!dev || !(dev->features & CLOCK_EVT_FEAT_ONESHOT) || | 65 | if (!dev || !(dev->features & CLOCK_EVT_FEAT_ONESHOT) || |
diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c index 99aa6ee3908f..73f90932282b 100644 --- a/kernel/time/tick-sched.c +++ b/kernel/time/tick-sched.c | |||
@@ -205,7 +205,7 @@ static void tick_nohz_restart_sched_tick(struct tick_sched *ts, ktime_t now); | |||
205 | */ | 205 | */ |
206 | void __tick_nohz_full_check(void) | 206 | void __tick_nohz_full_check(void) |
207 | { | 207 | { |
208 | struct tick_sched *ts = &__get_cpu_var(tick_cpu_sched); | 208 | struct tick_sched *ts = this_cpu_ptr(&tick_cpu_sched); |
209 | 209 | ||
210 | if (tick_nohz_full_cpu(smp_processor_id())) { | 210 | if (tick_nohz_full_cpu(smp_processor_id())) { |
211 | if (ts->tick_stopped && !is_idle_task(current)) { | 211 | if (ts->tick_stopped && !is_idle_task(current)) { |
@@ -545,7 +545,7 @@ static ktime_t tick_nohz_stop_sched_tick(struct tick_sched *ts, | |||
545 | unsigned long seq, last_jiffies, next_jiffies, delta_jiffies; | 545 | unsigned long seq, last_jiffies, next_jiffies, delta_jiffies; |
546 | ktime_t last_update, expires, ret = { .tv64 = 0 }; | 546 | ktime_t last_update, expires, ret = { .tv64 = 0 }; |
547 | unsigned long rcu_delta_jiffies; | 547 | unsigned long rcu_delta_jiffies; |
548 | struct clock_event_device *dev = __get_cpu_var(tick_cpu_device).evtdev; | 548 | struct clock_event_device *dev = __this_cpu_read(tick_cpu_device.evtdev); |
549 | u64 time_delta; | 549 | u64 time_delta; |
550 | 550 | ||
551 | time_delta = timekeeping_max_deferment(); | 551 | time_delta = timekeeping_max_deferment(); |
@@ -813,7 +813,7 @@ void tick_nohz_idle_enter(void) | |||
813 | 813 | ||
814 | local_irq_disable(); | 814 | local_irq_disable(); |
815 | 815 | ||
816 | ts = &__get_cpu_var(tick_cpu_sched); | 816 | ts = this_cpu_ptr(&tick_cpu_sched); |
817 | ts->inidle = 1; | 817 | ts->inidle = 1; |
818 | __tick_nohz_idle_enter(ts); | 818 | __tick_nohz_idle_enter(ts); |
819 | 819 | ||
@@ -831,7 +831,7 @@ EXPORT_SYMBOL_GPL(tick_nohz_idle_enter); | |||
831 | */ | 831 | */ |
832 | void tick_nohz_irq_exit(void) | 832 | void tick_nohz_irq_exit(void) |
833 | { | 833 | { |
834 | struct tick_sched *ts = &__get_cpu_var(tick_cpu_sched); | 834 | struct tick_sched *ts = this_cpu_ptr(&tick_cpu_sched); |
835 | 835 | ||
836 | if (ts->inidle) | 836 | if (ts->inidle) |
837 | __tick_nohz_idle_enter(ts); | 837 | __tick_nohz_idle_enter(ts); |
@@ -846,7 +846,7 @@ void tick_nohz_irq_exit(void) | |||
846 | */ | 846 | */ |
847 | ktime_t tick_nohz_get_sleep_length(void) | 847 | ktime_t tick_nohz_get_sleep_length(void) |
848 | { | 848 | { |
849 | struct tick_sched *ts = &__get_cpu_var(tick_cpu_sched); | 849 | struct tick_sched *ts = this_cpu_ptr(&tick_cpu_sched); |
850 | 850 | ||
851 | return ts->sleep_length; | 851 | return ts->sleep_length; |
852 | } | 852 | } |
@@ -959,7 +959,7 @@ static int tick_nohz_reprogram(struct tick_sched *ts, ktime_t now) | |||
959 | */ | 959 | */ |
960 | static void tick_nohz_handler(struct clock_event_device *dev) | 960 | static void tick_nohz_handler(struct clock_event_device *dev) |
961 | { | 961 | { |
962 | struct tick_sched *ts = &__get_cpu_var(tick_cpu_sched); | 962 | struct tick_sched *ts = this_cpu_ptr(&tick_cpu_sched); |
963 | struct pt_regs *regs = get_irq_regs(); | 963 | struct pt_regs *regs = get_irq_regs(); |
964 | ktime_t now = ktime_get(); | 964 | ktime_t now = ktime_get(); |
965 | 965 | ||
@@ -979,7 +979,7 @@ static void tick_nohz_handler(struct clock_event_device *dev) | |||
979 | */ | 979 | */ |
980 | static void tick_nohz_switch_to_nohz(void) | 980 | static void tick_nohz_switch_to_nohz(void) |
981 | { | 981 | { |
982 | struct tick_sched *ts = &__get_cpu_var(tick_cpu_sched); | 982 | struct tick_sched *ts = this_cpu_ptr(&tick_cpu_sched); |
983 | ktime_t next; | 983 | ktime_t next; |
984 | 984 | ||
985 | if (!tick_nohz_enabled) | 985 | if (!tick_nohz_enabled) |
@@ -1115,7 +1115,7 @@ early_param("skew_tick", skew_tick); | |||
1115 | */ | 1115 | */ |
1116 | void tick_setup_sched_timer(void) | 1116 | void tick_setup_sched_timer(void) |
1117 | { | 1117 | { |
1118 | struct tick_sched *ts = &__get_cpu_var(tick_cpu_sched); | 1118 | struct tick_sched *ts = this_cpu_ptr(&tick_cpu_sched); |
1119 | ktime_t now = ktime_get(); | 1119 | ktime_t now = ktime_get(); |
1120 | 1120 | ||
1121 | /* | 1121 | /* |
@@ -1184,7 +1184,7 @@ void tick_clock_notify(void) | |||
1184 | */ | 1184 | */ |
1185 | void tick_oneshot_notify(void) | 1185 | void tick_oneshot_notify(void) |
1186 | { | 1186 | { |
1187 | struct tick_sched *ts = &__get_cpu_var(tick_cpu_sched); | 1187 | struct tick_sched *ts = this_cpu_ptr(&tick_cpu_sched); |
1188 | 1188 | ||
1189 | set_bit(0, &ts->check_clocks); | 1189 | set_bit(0, &ts->check_clocks); |
1190 | } | 1190 | } |
@@ -1199,7 +1199,7 @@ void tick_oneshot_notify(void) | |||
1199 | */ | 1199 | */ |
1200 | int tick_check_oneshot_change(int allow_nohz) | 1200 | int tick_check_oneshot_change(int allow_nohz) |
1201 | { | 1201 | { |
1202 | struct tick_sched *ts = &__get_cpu_var(tick_cpu_sched); | 1202 | struct tick_sched *ts = this_cpu_ptr(&tick_cpu_sched); |
1203 | 1203 | ||
1204 | if (!test_and_clear_bit(0, &ts->check_clocks)) | 1204 | if (!test_and_clear_bit(0, &ts->check_clocks)) |
1205 | return 0; | 1205 | return 0; |
diff --git a/kernel/time/timer.c b/kernel/time/timer.c index aca5dfe2fa3d..04d8ed8399b0 100644 --- a/kernel/time/timer.c +++ b/kernel/time/timer.c | |||
@@ -655,7 +655,7 @@ static inline void debug_assert_init(struct timer_list *timer) | |||
655 | static void do_init_timer(struct timer_list *timer, unsigned int flags, | 655 | static void do_init_timer(struct timer_list *timer, unsigned int flags, |
656 | const char *name, struct lock_class_key *key) | 656 | const char *name, struct lock_class_key *key) |
657 | { | 657 | { |
658 | struct tvec_base *base = __raw_get_cpu_var(tvec_bases); | 658 | struct tvec_base *base = raw_cpu_read(tvec_bases); |
659 | 659 | ||
660 | timer->entry.next = NULL; | 660 | timer->entry.next = NULL; |
661 | timer->base = (void *)((unsigned long)base | flags); | 661 | timer->base = (void *)((unsigned long)base | flags); |