]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
[PATCH] uml: stack usage reduction
authorJeff Dike <jdike@addtoit.com>
Tue, 26 Sep 2006 06:33:08 +0000 (23:33 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 26 Sep 2006 15:49:09 +0000 (08:49 -0700)
commit75e29b18d9a46bf3193278e92dc95609a8cca2ab
tree413935160ac2f65c13ec5260a60cdd1d9259fd83
parentbf61f50d63b4d9e30d7a86a2d44bb300ae7c1dd4
[PATCH] uml: stack usage reduction

The KSTK_* macros used an inordinate amount of stack.  In order to overcome
an impedance mismatch between their interface, which just returns a single
register value, and the interface of get_thread_regs, which took a full
pt_regs, the implementation created an on-stack pt_regs, filled it in, and
returned one field.  do_task_stat calls KSTK_* twice, resulting in two
local pt_regs, blowing out the stack.

This patch changes the interface (and name) of get_thread_regs to just
return a single register from a jmp_buf.

The include of archsetjmp.h" in registers.h to get the definition of
jmp_buf exposed a bogus include of <setjmp.h> in start_up.c.  <setjmp.h>
shouldn't be used anywhere any more since UML uses the klibc
setjmp/longjmp.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/um/include/registers.h
arch/um/os-Linux/start_up.c
arch/um/os-Linux/sys-i386/registers.c
arch/um/os-Linux/sys-x86_64/registers.c
include/asm-um/processor-generic.h