aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/process_64.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-02-20 23:18:40 -0500
committerIngo Molnar <mingo@elte.hu>2008-04-17 11:40:49 -0400
commit513ad84bf60d96a6998bca10ed07c3d340449be8 (patch)
tree2a1600178aea7e130c5881ac861cb5aa69450937 /arch/x86/kernel/process_64.c
parent1180e01de50c0c7683c6648251f32957bc2d7850 (diff)
x86: de-macro start_thread()
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/process_64.c')
-rw-r--r--arch/x86/kernel/process_64.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c
index 46c4c546b499..1ffce14cff6e 100644
--- a/arch/x86/kernel/process_64.c
+++ b/arch/x86/kernel/process_64.c
@@ -528,6 +528,21 @@ out:
528 return err; 528 return err;
529} 529}
530 530
531void
532start_thread(struct pt_regs *regs, unsigned long new_ip, unsigned long new_sp)
533{
534 asm volatile("movl %0, %%fs; movl %0, %%es; movl %0, %%ds" :: "r"(0));
535 load_gs_index(0);
536 regs->ip = new_ip;
537 regs->sp = new_sp;
538 write_pda(oldrsp, new_sp);
539 regs->cs = __USER_CS;
540 regs->ss = __USER_DS;
541 regs->flags = 0x200;
542 set_fs(USER_DS);
543}
544EXPORT_SYMBOL_GPL(start_thread);
545
531/* 546/*
532 * This special macro can be used to load a debugging register 547 * This special macro can be used to load a debugging register
533 */ 548 */