linux-stable/arch
Jeff Dike 3c91735099 [PATCH] uml: thread creation tidying
fork on UML has always somewhat subtle.  The underlying cause has been the
need to initialize a stack for the new process.  The only portable way to
initialize a new stack is to set it as the alternate signal stack and take a
signal.  The signal handler does whatever initialization is needed and jumps
back to the original stack, where the fork processing is finished.  The basic
context switching mechanism is a jmp_buf for each process.  You switch to a
new process by longjmping to its jmp_buf.

Now that UML has its own implementation of setjmp and longjmp, and I can poke
around inside a jmp_buf without fear that libc will change the structure, a
much simpler mechanism is possible.  The jmpbuf can simply be initialized by
hand.

This eliminates -
	the need to set up and remove the alternate signal stack
	sending and handling a signal
	the signal blocking needed around the stack switching, since
there is no stack switching
	setting up the jmp_buf needed to jump back to the original
stack after the new one is set up

In addition, since jmp_buf is now defined by UML, and not by libc, it can be
embedded in the thread struct.  This makes it unnecessary to have it exist on
the stack, where it used to be.  It also simplifies interfaces, since the
switch jmp_buf used to be a void * inside the thread struct, and functions
which took it as an argument needed to define a jmp_buf variable and assign it
from the void *.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-27 08:26:16 -07:00
..
alpha [PATCH] alpha: Fix ALPHA_EV56 dependencies typo 2006-09-26 08:48:57 -07:00
arm [PATCH] Standardize pxx_page macros 2006-09-26 08:48:51 -07:00
arm26 [PATCH] tty: Remove include of screen_info.h from tty.h 2006-07-10 13:24:16 -07:00
avr32 [PATCH] AVR32: Use unsigned long flags for saving interrupt state 2006-09-27 08:26:13 -07:00
cris [PATCH] pcf8563: remove MOD_INC_USE_COUNT, MOD_DEC_USE_COUNT 2006-07-10 13:24:22 -07:00
frv [PATCH] FRV: permit __do_IRQ() to be dispensed with 2006-09-26 08:48:53 -07:00
h8300 [PATCH] reduce MAX_NR_ZONES: fix MAX_NR_ZONES array initializations 2006-09-26 08:48:46 -07:00
i386 [PATCH] Have x86 use add_active_range() and free_area_init_nodes 2006-09-27 08:26:11 -07:00
ia64 [PATCH] Have ia64 use add_active_range() and free_area_init_nodes 2006-09-27 08:26:11 -07:00
m32r [PATCH] reduce MAX_NR_ZONES: fix MAX_NR_ZONES array initializations 2006-09-26 08:48:46 -07:00
m68k [PATCH] irq-flags: M68K: Use the new IRQF_ constants 2006-07-02 13:58:47 -07:00
m68knommu [PATCH] reduce MAX_NR_ZONES: fix MAX_NR_ZONES array initializations 2006-09-26 08:48:46 -07:00
mips [MIPS] setup.c: use early_param() for early command line parsing 2006-09-27 13:38:04 +01:00
parisc [PATCH] NUMA: Add zone_to_nid function 2006-09-26 08:48:52 -07:00
powerpc [PATCH] Have Power use add_active_range() and free_area_init_nodes() 2006-09-27 08:26:11 -07:00
ppc [PATCH] Have Power use add_active_range() and free_area_init_nodes() 2006-09-27 08:26:11 -07:00
s390 Merge branch 'for-linus' of git://one.firstfloor.org/home/andi/git/linux-2.6 2006-09-26 13:07:55 -07:00
sh [PATCH] Standardize pxx_page macros 2006-09-26 08:48:51 -07:00
sh64 [PATCH] reduce MAX_NR_ZONES: fix MAX_NR_ZONES array initializations 2006-09-26 08:48:46 -07:00
sparc [PATCH] Standardize pxx_page macros 2006-09-26 08:48:51 -07:00
sparc64 [SPARC64]: Fix section-mismatch errors in solaris emul module. 2006-09-25 16:39:55 -07:00
um [PATCH] uml: thread creation tidying 2006-09-27 08:26:16 -07:00
v850 [PATCH] v850: call init_page_count() instead of set_page_count() 2006-07-31 13:28:38 -07:00
x86_64 [PATCH] Allow an arch to expand node boundaries 2006-09-27 08:26:12 -07:00
xtensa [PATCH] xtensa: ptrace: EXIT_ZOMBIE fix 2006-09-01 11:39:08 -07:00