diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-02-20 23:18:40 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-04-17 11:40:49 -0400 |
commit | 513ad84bf60d96a6998bca10ed07c3d340449be8 (patch) | |
tree | 2a1600178aea7e130c5881ac861cb5aa69450937 /arch/x86/kernel/process_32.c | |
parent | 1180e01de50c0c7683c6648251f32957bc2d7850 (diff) |
x86: de-macro start_thread()
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/process_32.c')
-rw-r--r-- | arch/x86/kernel/process_32.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c index 2cd89b8a7050..9230ce060d09 100644 --- a/arch/x86/kernel/process_32.c +++ b/arch/x86/kernel/process_32.c | |||
@@ -512,6 +512,21 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long sp, | |||
512 | return err; | 512 | return err; |
513 | } | 513 | } |
514 | 514 | ||
515 | void | ||
516 | start_thread(struct pt_regs *regs, unsigned long new_ip, unsigned long new_sp) | ||
517 | { | ||
518 | __asm__("movl %0, %%gs" :: "r"(0)); | ||
519 | regs->fs = 0; | ||
520 | set_fs(USER_DS); | ||
521 | regs->ds = __USER_DS; | ||
522 | regs->es = __USER_DS; | ||
523 | regs->ss = __USER_DS; | ||
524 | regs->cs = __USER_CS; | ||
525 | regs->ip = new_ip; | ||
526 | regs->sp = new_sp; | ||
527 | } | ||
528 | EXPORT_SYMBOL_GPL(start_thread); | ||
529 | |||
515 | #ifdef CONFIG_SECCOMP | 530 | #ifdef CONFIG_SECCOMP |
516 | static void hard_disable_TSC(void) | 531 | static void hard_disable_TSC(void) |
517 | { | 532 | { |