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

kernel misc: Replace __get_cpu_var uses

Replace uses of __get_cpu_var for address calculation with this_cpu_ptr.

Cc: akpm@linux-foundation.org
Signed-off-by: default avatarChristoph Lameter <cl@linux.com>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
parent 7d1311b9
...@@ -2628,7 +2628,7 @@ void wake_up_klogd(void) ...@@ -2628,7 +2628,7 @@ void wake_up_klogd(void)
preempt_disable(); preempt_disable();
if (waitqueue_active(&log_wait)) { if (waitqueue_active(&log_wait)) {
this_cpu_or(printk_pending, PRINTK_PENDING_WAKEUP); this_cpu_or(printk_pending, PRINTK_PENDING_WAKEUP);
irq_work_queue(&__get_cpu_var(wake_up_klogd_work)); irq_work_queue(this_cpu_ptr(&wake_up_klogd_work));
} }
preempt_enable(); preempt_enable();
} }
...@@ -2644,7 +2644,7 @@ int printk_deferred(const char *fmt, ...) ...@@ -2644,7 +2644,7 @@ int printk_deferred(const char *fmt, ...)
va_end(args); va_end(args);
__this_cpu_or(printk_pending, PRINTK_PENDING_OUTPUT); __this_cpu_or(printk_pending, PRINTK_PENDING_OUTPUT);
irq_work_queue(&__get_cpu_var(wake_up_klogd_work)); irq_work_queue(this_cpu_ptr(&wake_up_klogd_work));
preempt_enable(); preempt_enable();
return r; return r;
......
...@@ -164,7 +164,7 @@ static int generic_exec_single(int cpu, struct call_single_data *csd, ...@@ -164,7 +164,7 @@ static int generic_exec_single(int cpu, struct call_single_data *csd,
if (!csd) { if (!csd) {
csd = &csd_stack; csd = &csd_stack;
if (!wait) if (!wait)
csd = &__get_cpu_var(csd_data); csd = this_cpu_ptr(&csd_data);
} }
csd_lock(csd); csd_lock(csd);
...@@ -229,7 +229,7 @@ static void flush_smp_call_function_queue(bool warn_cpu_offline) ...@@ -229,7 +229,7 @@ static void flush_smp_call_function_queue(bool warn_cpu_offline)
WARN_ON(!irqs_disabled()); WARN_ON(!irqs_disabled());
head = &__get_cpu_var(call_single_queue); head = this_cpu_ptr(&call_single_queue);
entry = llist_del_all(head); entry = llist_del_all(head);
entry = llist_reverse_order(entry); entry = llist_reverse_order(entry);
...@@ -419,7 +419,7 @@ void smp_call_function_many(const struct cpumask *mask, ...@@ -419,7 +419,7 @@ void smp_call_function_many(const struct cpumask *mask,
return; return;
} }
cfd = &__get_cpu_var(cfd_data); cfd = this_cpu_ptr(&cfd_data);
cpumask_and(cfd->cpumask, mask, cpu_online_mask); cpumask_and(cfd->cpumask, mask, cpu_online_mask);
cpumask_clear_cpu(this_cpu, cfd->cpumask); cpumask_clear_cpu(this_cpu, cfd->cpumask);
......
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