On Tue, 2011-03-08 at 17:37 +1100, Benjamin Herrenschmidt wrote: > Signed-off-by: Benjamin Herrenschmidt <b...@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
signature.asc
Description: This is a digitally signed message part
_______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev