[PATCH 15/18] powerpc/smp: Don't expose per-cpu "cpu_state" array

Michael Ellerman michael at ellerman.id.au
Tue Mar 29 16:37:20 EST 2011


On Tue, 2011-03-08 at 17:37 +1100, Benjamin Herrenschmidt wrote:
> Instead, keep it static, expose an accessor and use that from
> the PowerMac code. Avoids easy namespace collisions and will
> make it easier to consolidate with other implementations.
> 
> Signed-off-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>
> ---
>  arch/powerpc/include/asm/smp.h        |    2 +-
>  arch/powerpc/kernel/smp.c             |    7 ++++++-
>  arch/powerpc/platforms/powermac/smp.c |   12 ++++++++----
>  3 files changed, 15 insertions(+), 6 deletions(-)
> 
> diff --git a/arch/powerpc/include/asm/smp.h b/arch/powerpc/include/asm/smp.h
> index 7e99771..a902a0d 100644
> --- a/arch/powerpc/include/asm/smp.h
> +++ b/arch/powerpc/include/asm/smp.h
> @@ -45,7 +45,7 @@ extern void migrate_irqs(void);
>  int generic_cpu_disable(void);
>  void generic_cpu_die(unsigned int cpu);
>  void generic_mach_cpu_die(void);
> -DECLARE_PER_CPU(int, cpu_state);
> +void generic_set_cpu_dead(unsigned int cpu);

Takes a cpu parameter ..

> +void generic_set_cpu_dead(unsigned int cpu)
> +{
> +	__get_cpu_var(cpu_state) = CPU_DEAD;
> +}

But doesn't use it.

cheers

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20110329/477d3793/attachment.pgp>


More information about the Linuxppc-dev mailing list