Subject: Re: [PATCH 17/18] powerpc/smp: Increase vdso_data->processorCount, not just decrease it

From: Benjamin Herrenschmidt <[email-masked]>
Date: Thu, 10 Mar 2011 14:46:01 +1100

On Thu, 2011-03-10 at 14:41 +1100, Michael Ellerman wrote:
> 
> 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. 

I agree, on the other hand I'm worried about the way that things it
used in lparcfg.c (which looks bogus regardless) and it's not clear
to me what userspace uses it for (I bet some "licencing" stuff :-)

The lparcfg bit looks like something that should turn into counting
possible processors I suppose but it's hard to tell.

Cheers,
Ben.