kernel-ark/arch/um/kernel
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
..
skas [PATCH] uml: remove a dead file 2006-02-07 16:12:32 -08:00
tt [PATCH] uml: TT - SYSCALL_DEBUG - fix buglet introduced in cleanup 2006-02-01 08:53:22 -08:00
asm-offsets.c
config.c.in
dyn.lds.S
exec_kern.c [PATCH] uml: some harmless sparse warning fixes 2006-02-01 08:53:23 -08:00
exitcode.c
gmon_syms.c
gprof_syms.c
init_task.c
initrd.c
irq_user.c
irq.c
ksyms.c
Makefile [PATCH] uml: move libc-dependent time code 2006-01-18 19:20:19 -08:00
mem.c [PATCH] remove set_page_count() outside mm/ 2006-03-22 07:54:02 -08:00
physmem.c [PATCH] remove set_page_count(page, 0) users (outside mm) 2006-03-22 07:54:01 -08:00
process_kern.c [PATCH] uml: avoid malloc to sleep in atomic sections 2006-01-18 19:20:21 -08:00
ptrace.c
reboot.c [PATCH] uml: avoid "CONFIG_NR_CPUS undeclared" bogus error messages 2006-02-01 08:53:23 -08:00
resource.c
sigio_kern.c
sigio_user.c [PATCH] uml: sigio code - reduce spinlock hold time 2006-01-18 19:20:21 -08:00
signal_kern.c [PATCH] uml: use generic sys_rt_sigsuspend 2006-01-18 19:20:30 -08:00
smp.c
syscall_kern.c
syscall.c [PATCH] uml: move libc-dependent time code 2006-01-18 19:20:19 -08:00
sysrq.c
time_kern.c [PATCH] uml: TT mode softint fixes 2006-01-18 19:20:20 -08:00
time.c
tlb.c
trap_kern.c
tty_log.c
uaccess.c
um_arch.c [PATCH] x86: SMP alternatives 2006-03-23 07:38:04 -08:00
umid.c
uml.lds.S
vmlinux.lds.S