Hi,
Here next version of the SMP alternatives patch.
Had a more detailed look at the bits generated, the vast majority in the
smp alternatives table where simply lock prefixes. So I decided to
specical-case these to keep the table sizes small. There are three elf
sections now:
.smp_altinstructions
.smp_altinstr_replacement
These are pretty much the same like the existing non-smp
alternative bits, with the exception that the replacement
table also has some space to keep the original instruction, to
allow patching both SMP->UP and back UP->SMP. It's used to patch
the code for spinlocks with simpler UP versions.
.smp_locks
List of pointers to the lock prefixes to be NOP'ed for UP.
For the core kernel these three sections are grouped together and are
page-aligned, so they can be freed. Freeing happens automatically in
some cases where they not needed any more after booting up (UP system
found, kernel without CONFIG_HOTPLUG_CPU). There is also a kernel cmd
line option to force the tables being released.
For modules only the .smp_locks section is handled, the other ones
simply don't appear in modules ;)
cheers,
Gerd