Re: 2.6.17-rc3 -- SMP alternatives: switching to UP code

From: Chase Venters
Date: Tue May 09 2006 - 21:55:40 EST


On Tuesday 09 May 2006 19:29, Rene Herman wrote:
> Hi list.
>
> I just noticed this in the 2.6.17-rc3 dmesg:
>
> ===
> Checking 'hlt' instruction... OK.
> SMP alternatives: switching to UP code
> Freeing SMP alternatives: 0k freed
> ACPI: setting ELCR to 0400 (from 1608)
> ===
>
> Should I be seeing this "SMP alternatives" thing on a !CONFIG_SMP
> kernel? It does say 0k, but something is apparently being done at
> runtime still. Why?

This is part of a recent patch by Gerd Hoffmann:

>> Implement SMP alternatives, i.e. switching at runtime between different
>> code versions for UP and SMP. The code can patch both SMP->UP and UP->SMP.
>> The UP->SMP case is useful for CPU hotplug.

An explicit test of the smp variable (not CONFIG_SMP macro) exists in this
code. I missed the discussion about this patch, but it appears from reading
the patch notes that the behavior is intentional. More information can be
found in the git and lkml archives.

> Rene.

Thanks,
Chase
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/