percpu: Convert remaining __get_cpu_var uses in 3.18-rcX
authorChristoph Lameter <cl@linux.com>
Mon, 27 Oct 2014 15:49:45 +0000 (10:49 -0500)
committerTejun Heo <tj@kernel.org>
Wed, 29 Oct 2014 15:18:18 +0000 (11:18 -0400)
During the 3.18 merge period additional __get_cpu_var uses were
added. The patch converts these to this_cpu_ptr().

Signed-off-by: Christoph Lameter <cl@linux.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Tejun Heo <tj@kernel.org>
arch/arm64/kernel/psci.c
kernel/irq_work.c
kernel/time/tick-sched.c

index 866c1c821860d9689dc363b73001529ee3b5bec5..d56394b6dc990c461bbf642c64b29372a144c59a 100644 (file)
@@ -511,7 +511,7 @@ static int cpu_psci_cpu_kill(unsigned int cpu)
 
 static int psci_suspend_finisher(unsigned long index)
 {
-       struct psci_power_state *state = __get_cpu_var(psci_power_state);
+       struct psci_power_state *state = __this_cpu_read(psci_power_state);
 
        return psci_ops.cpu_suspend(state[index - 1],
                                    virt_to_phys(cpu_resume));
@@ -520,7 +520,7 @@ static int psci_suspend_finisher(unsigned long index)
 static int __maybe_unused cpu_psci_cpu_suspend(unsigned long index)
 {
        int ret;
-       struct psci_power_state *state = __get_cpu_var(psci_power_state);
+       struct psci_power_state *state = __this_cpu_read(psci_power_state);
        /*
         * idle state index 0 corresponds to wfi, should never be called
         * from the cpu_suspend operations
index 3ab9048483fa9c9041747b10bd0c8ec192b9a413..cbf9fb899d929bfc52a2d803b64643732b0b7bbd 100644 (file)
@@ -175,11 +175,11 @@ EXPORT_SYMBOL_GPL(irq_work_run);
 
 void irq_work_tick(void)
 {
-       struct llist_head *raised = &__get_cpu_var(raised_list);
+       struct llist_head *raised = this_cpu_ptr(&raised_list);
 
        if (!llist_empty(raised) && !arch_irq_work_has_interrupt())
                irq_work_run_list(raised);
-       irq_work_run_list(&__get_cpu_var(lazy_list));
+       irq_work_run_list(this_cpu_ptr(&lazy_list));
 }
 
 /*
index 7b5741fc411007825ec0ba0839caf4e0870e46e3..b1c6a512cdd05ce022db0a75cf948b4f65df2520 100644 (file)
@@ -235,7 +235,7 @@ void tick_nohz_full_kick(void)
        if (!tick_nohz_full_cpu(smp_processor_id()))
                return;
 
-       irq_work_queue(&__get_cpu_var(nohz_full_kick_work));
+       irq_work_queue(this_cpu_ptr(&nohz_full_kick_work));
 }
 
 /*