[PATCH] ARM: report present cpus in /proc/cpuinfo

Jon Mayo jmayo at nvidia.com
Wed Jun 22 16:54:40 EDT 2011


On 06/22/2011 01:19 PM, Russell King - ARM Linux wrote:
> On Wed, Jun 22, 2011 at 12:26:11PM -0700, Jon Mayo wrote:
>> On 06/22/2011 02:36 AM, Russell King - ARM Linux wrote:
>>> Think about it - if you have real hot-pluggable CPUs (servers do), do
>>> you _really_ want to try to bring online a possible CPU (iow, there's
>>> a socket on the board) but one which isn't present (iow, the socket is
>>> empty.)
>>>
>>> That's what the possible + !present case caters for.  Possible tells
>>> the kernel how many CPUs to allocate per-cpu data structures for.
>>> present tells it whether a CPU can be onlined or not.
>>>
>>
>> Yes, that's the difference between present and possible. I'm not
>> suggesting we report cpus that do not exist. I'm suggesting we report
>> cpus that are present, online or not.
>
> Which is _what_ we do.  The problem is that mach-tegra is causing
> the established well defined APIs to mean something else, and then
> you're complaining that those APIs don't mean what they were defined
> to be.
>

in arch/arm/kernel/setup.c :

#if defined(CONFIG_SMP)
         for_each_online_cpu(i) {

no, the arm kernel reports online cpus, not present cpus. I now agree 
that this is the correct behavior, and is consistent with all other 
platforms. but your responses about present versus possible don't match 
the code.

> You're really shooting yourself in the foot here, and at this point
> there is nothing left to discuss.
>
> I can't help you.  You need to discuss this with folk who look after
> the hotplug CPU stuff.
>
> You no longer have an ARM architecture problem, your problem is that
> you're abusing stuff to get what you want and then complaining that
> stuff doesn't work as you want it.

I'm not complaining, I was seeking advice on the right way to do things. 
You've given me advice. Thank You. End-of-thread.




More information about the linux-arm-kernel mailing list