Archived
14
0
Fork 0
This repository has been archived on 2022-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
linux-2.6/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 [PATCH] uml: fix missing KBUILD_BASENAME 2006-01-11 18:42:09 -08:00
config.c.in Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
dyn.lds.S [PATCH] i386 / uml: add dwarf sections to static link script 2005-09-10 12:00:17 -07:00
exec_kern.c [PATCH] uml: some harmless sparse warning fixes 2006-02-01 08:53:23 -08:00
exitcode.c [PATCH] uml: Clean up prink calls 2005-07-28 21:46:05 -07:00
gmon_syms.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
gprof_syms.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
init_task.c [PATCH] uml: move libc code out of mem_user.c and tempfile.c 2005-09-17 11:50:00 -07:00
initrd.c [PATCH] uml: initrd cleanup 2005-05-20 15:48:18 -07:00
irq.c [PATCH] useless linux/irq.h includes (arch/um) 2005-09-30 08:42:24 -07:00
irq_user.c [PATCH] uml: move libc-dependent code from signal_user.c 2006-01-08 20:13:39 -08:00
ksyms.c [PATCH] uml: separate libc-dependent helper code 2005-11-07 07:53:31 -08:00
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 [PATCH] consolidate sys_ptrace() 2005-11-07 07:53:42 -08:00
reboot.c [PATCH] uml: avoid "CONFIG_NR_CPUS undeclared" bogus error messages 2006-02-01 08:53:23 -08:00
resource.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
sigio_kern.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
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 Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
syscall.c [PATCH] uml: move libc-dependent time code 2006-01-18 19:20:19 -08:00
syscall_kern.c [PATCH] uml: fork cleanup 2005-06-25 16:24:35 -07:00
sysrq.c [PATCH] uml: Fix sysrq-r support for skas mode 2005-10-04 13:22:01 -07:00
time.c [PATCH] hrtimer: convert posix timers completely 2006-01-10 08:01:39 -08:00
time_kern.c [PATCH] uml: TT mode softint fixes 2006-01-18 19:20:20 -08:00
tlb.c [PATCH] uml: fix condition in tlb flush 2005-09-22 22:17:36 -07:00
trap_kern.c [PATCH] uml: merge trap_user.c and trap_kern.c 2006-01-08 20:13:39 -08:00
tty_log.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
uaccess.c [PATCH] uml: separate libc-dependent uaccess code 2005-11-07 07:53:31 -08:00
um_arch.c [PATCH] x86: SMP alternatives 2006-03-23 07:38:04 -08:00
umid.c [PATCH] uml: umid cleanup 2006-01-06 08:33:47 -08:00
uml.lds.S [PATCH] i386 / uml: add dwarf sections to static link script 2005-09-10 12:00:17 -07:00
vmlinux.lds.S [PATCH] uml: include the linker script rather than symlink it 2005-05-05 16:36:33 -07:00