linux/include
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
..
acpi [ACPI] ACPICA 20060127 2006-01-31 03:25:09 -05:00
asm-alpha [PATCH] add asm-generic/mman.h 2006-02-15 15:32:22 -08:00
asm-arm Merge master.kernel.org:/home/rmk/linux-2.6-arm 2006-03-22 17:32:09 -08:00
asm-arm26 [PATCH] add asm-generic/mman.h 2006-02-15 15:32:22 -08:00
asm-cris [PATCH] add asm-generic/mman.h 2006-02-15 15:32:22 -08:00
asm-frv [PATCH] add asm-generic/mman.h 2006-02-15 15:32:22 -08:00
asm-generic [PATCH] add EXPORT_SYMBOL_GPL_FUTURE() 2006-03-20 13:42:58 -08:00
asm-h8300 [PATCH] add asm-generic/mman.h 2006-02-15 15:32:22 -08:00
asm-i386 [PATCH] x86: SMP alternatives 2006-03-23 07:38:04 -08:00
asm-ia64 [PATCH] hugepage: is_aligned_hugepage_range() cleanup 2006-03-22 07:54:04 -08:00
asm-m32r [PATCH] m32r: fix and update for gcc-4.0 2006-02-24 14:31:36 -08:00
asm-m68k [PATCH] m68k: fix cmpxchg compile errors if CONFIG_RMW_INSNS=n 2006-03-09 19:47:38 -08:00
asm-m68knommu [PATCH] m68knommu: hardirq.h needs definition of NR_IRQS 2006-02-07 16:16:54 -08:00
asm-mips It's UTF-8 2006-03-22 00:13:35 +01:00
asm-parisc [PATCH] add asm-generic/mman.h 2006-02-15 15:32:22 -08:00
asm-powerpc Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc 2006-03-22 22:20:46 -08:00
asm-ppc powerpc: Implement accurate task and CPU time accounting 2006-02-24 14:05:56 +11:00
asm-s390 [PATCH] mm: remove set_pgdir leftovers 2006-03-22 07:53:56 -08:00
asm-sh [PATCH] add asm-generic/mman.h 2006-02-15 15:32:22 -08:00
asm-sh64 [PATCH] mm: remove set_pgdir leftovers 2006-03-22 07:53:56 -08:00
asm-sparc [SPARC]: Respect vm_page_prot in io_remap_page_range(). 2006-03-22 01:15:13 -08:00
asm-sparc64 [SPARC64]: Add a secondary TSB for hugepage mappings. 2006-03-22 01:15:14 -08:00
asm-um [PATCH] x86: SMP alternatives 2006-03-23 07:38:04 -08:00
asm-v850 [PATCH] add asm-generic/mman.h 2006-02-15 15:32:22 -08:00
asm-x86_64 [PATCH] Enable mprotect on huge pages 2006-03-22 07:54:03 -08:00
asm-xtensa [PATCH] add asm-generic/mman.h 2006-02-15 15:32:22 -08:00
keys
linux [PATCH] DM: Fix bug: BIO_RW_BARRIER requests to md/raid1 hang. 2006-03-23 07:38:03 -08:00
math-emu
media V4L/DVB (3513): Remove saa711x driver 2006-03-21 08:53:40 -08:00
mtd
net [NETFILTER]: futher {ip,ip6,arp}_tables unification 2006-03-22 13:56:56 -08:00
pcmcia [PATCH] pcmcia: Add macro to match PCMCIA cards by numeric ID and first vendor string 2006-03-01 11:11:26 +01:00
rdma IB/umad: Add support for large RMPP transfers 2006-03-20 10:08:23 -08:00
rxrpc
scsi Merge ../linux-2.6 2006-03-21 13:05:45 -06:00
sound [ALSA] version 1.0.11rc4 2006-03-22 14:37:15 +01:00
video [PATCH] neofb: avoid resetting display config on unblank (v2) 2006-02-15 15:32:21 -08:00