* [percpu] Convert remaining __get_cpu_var uses in 3.18-rcX
@ 2014-10-27 15:49 Christoph Lameter
2014-10-27 15:59 ` Will Deacon
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Christoph Lameter @ 2014-10-27 15:49 UTC (permalink / raw)
To: linux-arm-kernel
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>
Index: linux/arch/arm64/kernel/psci.c
===================================================================
--- linux.orig/arch/arm64/kernel/psci.c
+++ linux/arch/arm64/kernel/psci.c
@@ -511,7 +511,7 @@ static int cpu_psci_cpu_kill(unsigned in
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(unsigne
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: linux/kernel/irq_work.c
===================================================================
--- linux.orig/kernel/irq_work.c
+++ linux/kernel/irq_work.c
@@ -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: linux/kernel/time/tick-sched.c
===================================================================
--- linux.orig/kernel/time/tick-sched.c
+++ linux/kernel/time/tick-sched.c
@@ -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));
}
/*
^ permalink raw reply [flat|nested] 4+ messages in thread
* [percpu] Convert remaining __get_cpu_var uses in 3.18-rcX
2014-10-27 15:49 [percpu] Convert remaining __get_cpu_var uses in 3.18-rcX Christoph Lameter
@ 2014-10-27 15:59 ` Will Deacon
2014-10-28 15:33 ` Thomas Gleixner
2014-10-29 15:19 ` Tejun Heo
2 siblings, 0 replies; 4+ messages in thread
From: Will Deacon @ 2014-10-27 15:59 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Oct 27, 2014 at 03:49:45PM +0000, Christoph Lameter wrote:
> 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>
>
> Index: linux/arch/arm64/kernel/psci.c
> ===================================================================
> --- linux.orig/arch/arm64/kernel/psci.c
> +++ linux/arch/arm64/kernel/psci.c
> @@ -511,7 +511,7 @@ static int cpu_psci_cpu_kill(unsigned in
>
> 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(unsigne
> 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
Apologies for not spotting this one during review:
Acked-by: Will Deacon <will.deacon@arm.com>
Feel free to take this via some other route (than the arm64 tree).
Will
^ permalink raw reply [flat|nested] 4+ messages in thread
* [percpu] Convert remaining __get_cpu_var uses in 3.18-rcX
2014-10-27 15:49 [percpu] Convert remaining __get_cpu_var uses in 3.18-rcX Christoph Lameter
2014-10-27 15:59 ` Will Deacon
@ 2014-10-28 15:33 ` Thomas Gleixner
2014-10-29 15:19 ` Tejun Heo
2 siblings, 0 replies; 4+ messages in thread
From: Thomas Gleixner @ 2014-10-28 15:33 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, 27 Oct 2014, Christoph Lameter wrote:
> 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: Thomas Gleixner <tglx@linutronix.de>
> Index: linux/arch/arm64/kernel/psci.c
> ===================================================================
> --- linux.orig/arch/arm64/kernel/psci.c
> +++ linux/arch/arm64/kernel/psci.c
> @@ -511,7 +511,7 @@ static int cpu_psci_cpu_kill(unsigned in
>
> 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(unsigne
> 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: linux/kernel/irq_work.c
> ===================================================================
> --- linux.orig/kernel/irq_work.c
> +++ linux/kernel/irq_work.c
> @@ -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: linux/kernel/time/tick-sched.c
> ===================================================================
> --- linux.orig/kernel/time/tick-sched.c
> +++ linux/kernel/time/tick-sched.c
> @@ -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));
> }
>
> /*
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [percpu] Convert remaining __get_cpu_var uses in 3.18-rcX
2014-10-27 15:49 [percpu] Convert remaining __get_cpu_var uses in 3.18-rcX Christoph Lameter
2014-10-27 15:59 ` Will Deacon
2014-10-28 15:33 ` Thomas Gleixner
@ 2014-10-29 15:19 ` Tejun Heo
2 siblings, 0 replies; 4+ messages in thread
From: Tejun Heo @ 2014-10-29 15:19 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Oct 27, 2014 at 10:49:45AM -0500, Christoph Lameter wrote:
> 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>
Applied to percpu/for-3.19.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-10-29 15:19 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-27 15:49 [percpu] Convert remaining __get_cpu_var uses in 3.18-rcX Christoph Lameter
2014-10-27 15:59 ` Will Deacon
2014-10-28 15:33 ` Thomas Gleixner
2014-10-29 15:19 ` Tejun Heo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).