]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
x86: add %gs accessors for x86_32
authorTejun Heo <tj@kernel.org>
Mon, 9 Feb 2009 13:17:40 +0000 (22:17 +0900)
committerIngo Molnar <mingo@elte.hu>
Mon, 9 Feb 2009 23:41:58 +0000 (00:41 +0100)
commitd9a89a26e02ef9ed03f74a755a8b4d8f3a066622
tree35f3713bca4e6b815f6b9db92dc9d812ec7213ff
parentf0d96110f9fd98a1a22e03b8adba69508843d910
x86: add %gs accessors for x86_32

Impact: cleanup

On x86_32, %gs is handled lazily.  It's not saved and restored on
kernel entry/exit but only when necessary which usually is during task
switch but there are few other places.  Currently, it's done by
calling savesegment() and loadsegment() explicitly.  Define
get_user_gs(), set_user_gs() and task_user_gs() and use them instead.

While at it, clean up register access macros in signal.c.

This cleans up code a bit and will help future changes.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/include/asm/a.out-core.h
arch/x86/include/asm/elf.h
arch/x86/include/asm/mmu_context.h
arch/x86/include/asm/system.h
arch/x86/kernel/process_32.c
arch/x86/kernel/ptrace.c
arch/x86/kernel/signal.c
arch/x86/kernel/vm86_32.c
arch/x86/math-emu/get_address.c