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

Russell King - ARM Linux linux at arm.linux.org.uk
Wed Jun 22 16:57:30 EDT 2011


On Wed, Jun 22, 2011 at 01:54:40PM -0700, Jon Mayo wrote:
> 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.

Yes they do, and that is enforced by generic code.

If you disagree, then say _where_ and _why_, don't just say "don't
match".



More information about the linux-arm-kernel mailing list