[PATCH 17/18] powerpc/smp: Increase vdso_data->processorCount, not just decrease it
Michael Ellerman
michael at ellerman.id.au
Thu Mar 10 14:41:07 EST 2011
On Tue, 2011-03-08 at 17:37 +1100, Benjamin Herrenschmidt wrote:
> Signed-off-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>
> ---
> arch/powerpc/kernel/smp.c | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
> index e337073..6023395 100644
> --- a/arch/powerpc/kernel/smp.c
> +++ b/arch/powerpc/kernel/smp.c
> @@ -551,6 +551,10 @@ void __devinit start_secondary(void *unused)
>
> secondary_cpu_time_init();
>
> +#ifdef CONFIG_PPC64
> + if (system_state == SYSTEM_RUNNING)
> + vdso_data->processorCount++;
> +#endif
So the SYSTEM_RUNNING check is to avoid clashing with the logic in
smp_setup_cpu_maps() I presume:
arch/powerpc/kernel/setup-common.c: vdso_data->processorCount = num_present_cpus();
But why not remove that, and let the increment in start_secondary() do
all the work?
With the current code if a cpu is present but fails to come up the count
will be wrong I think.
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/20110310/3ae958f5/attachment.pgp>
More information about the Linuxppc-dev
mailing list