[PATCH 03/27] smpboot: Define and use cpu_state per-cpu variable in generic code

David Daney ddaney.cavm at gmail.com
Sat Jun 2 02:59:07 EST 2012


On 06/01/2012 02:10 AM, Srivatsa S. Bhat wrote:
> The per-cpu variable cpu_state is used in x86 and also used in other
> architectures, to track the state of the cpu during bringup and hotplug.
> Pull it out into generic code.
>
> Cc: Tony Luck<tony.luck at intel.com>
> Cc: Fenghua Yu<fenghua.yu at intel.com>
> Cc: Ralf Baechle<ralf at linux-mips.org>
> Cc: Benjamin Herrenschmidt<benh at kernel.crashing.org>
> Cc: Paul Mundt<lethal at linux-sh.org>
> Cc: Chris Metcalf<cmetcalf at tilera.com>
> Cc: Thomas Gleixner<tglx at linutronix.de>
> Cc: Ingo Molnar<mingo at redhat.com>
> Cc: "H. Peter Anvin"<hpa at zytor.com>
> Cc: x86 at kernel.org
> Cc: Konrad Rzeszutek Wilk<konrad.wilk at oracle.com>
> Cc: Jeremy Fitzhardinge<jeremy at goop.org>
> Cc: Peter Zijlstra<a.p.zijlstra at chello.nl>
> Cc: Andrew Morton<akpm at linux-foundation.org>
> Cc: Mike Frysinger<vapier at gentoo.org>
> Cc: Yong Zhang<yong.zhang0 at gmail.com>
> Cc: Venkatesh Pallipadi<venki at google.com>
> Cc: Suresh Siddha<suresh.b.siddha at intel.com>
> Cc: linux-ia64 at vger.kernel.org
> Cc: linux-mips at linux-mips.org
> Cc: linuxppc-dev at lists.ozlabs.org
> Cc: linux-sh at vger.kernel.org
> Cc: xen-devel at lists.xensource.com
> Cc: virtualization at lists.linux-foundation.org
> Signed-off-by: Srivatsa S. Bhat<srivatsa.bhat at linux.vnet.ibm.com>
> ---
>
>   arch/ia64/include/asm/cpu.h   |    2 --
>   arch/ia64/kernel/process.c    |    1 +
>   arch/ia64/kernel/smpboot.c    |    6 +-----
>   arch/mips/cavium-octeon/smp.c |    4 +---
>   arch/powerpc/kernel/smp.c     |    6 +-----
>   arch/sh/include/asm/smp.h     |    2 --
>   arch/sh/kernel/smp.c          |    4 +---
>   arch/tile/kernel/smpboot.c    |    4 +---
>   arch/x86/include/asm/cpu.h    |    2 --
>   arch/x86/kernel/smpboot.c     |    4 +---
>   arch/x86/xen/smp.c            |    1 +
>   include/linux/smpboot.h       |    1 +
>   kernel/smpboot.c              |    4 ++++
>   13 files changed, 13 insertions(+), 28 deletions(-)
>
[...]
> diff --git a/arch/mips/cavium-octeon/smp.c b/arch/mips/cavium-octeon/smp.c
> index 97e7ce9..93cd4b0 100644
> --- a/arch/mips/cavium-octeon/smp.c
> +++ b/arch/mips/cavium-octeon/smp.c
> @@ -13,6 +13,7 @@
>   #include<linux/kernel_stat.h>
>   #include<linux/sched.h>
>   #include<linux/module.h>
> +#include<linux/smpboot.h>
>
>   #include<asm/mmu_context.h>
>   #include<asm/time.h>
> @@ -252,9 +253,6 @@ static void octeon_cpus_done(void)
>
>   #ifdef CONFIG_HOTPLUG_CPU
>
> -/* State of each CPU. */
> -DEFINE_PER_CPU(int, cpu_state);
> -
>   extern void fixup_irqs(void);
>
>   static DEFINE_SPINLOCK(smp_reserve_lock);

The Octeon bit:

Acked-by: David Daney <david.daney at cavium.com>


FWIW, the rest looks good too.


More information about the Linuxppc-dev mailing list