linux-stable/arch/i386/kernel/cpu
Gerd Hoffmann 9a0b5817ad [PATCH] x86: SMP alternatives
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.

With CONFIG_CPU_HOTPLUG enabled the code switches to UP at boot time and
when the number of CPUs goes down to 1, and switches to SMP when the number
of CPUs goes up to 2.

Without CONFIG_CPU_HOTPLUG or on non-SMP-capable systems the code is
patched once at boot time (if needed) and the tables are released
afterwards.

The changes in detail:

  * The current alternatives bits are moved to a separate file,
    the SMP alternatives code is added there.

  * The patch adds some new elf sections to the kernel:
    .smp_altinstructions
	like .altinstructions, also contains a list
	of alt_instr structs.
    .smp_altinstr_replacement
	like .altinstr_replacement, but also has some space to
	save original instruction before replaving it.
    .smp_locks
	list of pointers to lock prefixes which can be nop'ed
	out on UP.
    The first two are used to replace more complex instruction
    sequences such as spinlocks and semaphores.  It would be possible
    to deal with the lock prefixes with that as well, but by handling
    them as special case the table sizes become much smaller.

 * The sections are page-aligned and padded up to page size, so they
   can be free if they are not needed.

 * Splitted the code to release init pages to a separate function and
   use it to release the elf sections if they are unused.

Signed-off-by: Gerd Hoffmann <kraxel@suse.de>
Signed-off-by: Chuck Ebbert <76306.1226@compuserve.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-23 07:38:04 -08:00
..
cpufreq Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6 2006-02-01 22:06:15 -08:00
mcheck [PATCH] x86: add MCE resume 2005-11-07 07:53:30 -08:00
mtrr Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/x86 2006-01-31 16:21:44 -08:00
amd.c [PATCH] i386 cpu hotplug: don't access freed memory 2006-02-05 11:06:53 -08:00
centaur.c [PATCH] i386 cpu hotplug: don't access freed memory 2006-02-05 11:06:53 -08:00
common.c [PATCH] x86: cpu model calculation for family 6 cpu 2006-03-08 14:14:01 -08:00
cpu.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
cyrix.c [PATCH] i386 cpu hotplug: don't access freed memory 2006-02-05 11:06:53 -08:00
intel.c [PATCH] i386/x86-64: Generalize X86_FEATURE_CONSTANT_TSC flag 2006-01-11 19:01:12 -08:00
intel_cacheinfo.c [PATCH] i386 cpu hotplug: don't access freed memory 2006-02-05 11:06:53 -08:00
Makefile Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
nexgen.c [PATCH] i386 cpu hotplug: don't access freed memory 2006-02-05 11:06:53 -08:00
proc.c [PATCH] x86: SMP alternatives 2006-03-23 07:38:04 -08:00
rise.c [PATCH] i386 cpu hotplug: don't access freed memory 2006-02-05 11:06:53 -08:00
transmeta.c [PATCH] x86_64: Add boot option to disable randomized mappings and cleanup 2006-02-17 08:00:40 -08:00
umc.c [PATCH] i386 cpu hotplug: don't access freed memory 2006-02-05 11:06:53 -08:00