aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/process_32.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-01-30 07:31:02 -0500
committerIngo Molnar <mingo@elte.hu>2008-01-30 07:31:02 -0500
commitfaca62273b602ab482fb7d3d940dbf41ef08b00e (patch)
tree913fb1c565a2b719b00ae4b745c38cc9b0ebf279 /arch/x86/kernel/process_32.c
parent25149b62d3e6a3e737af39bd4a0b4e97de0811b7 (diff)
x86: use generic register name in the thread and tss structures
This changes size-specific register names (eip/rip, esp/rsp, etc.) to generic names in the thread and tss structures. Signed-off-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/kernel/process_32.c')
-rw-r--r--arch/x86/kernel/process_32.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c
index 3744cf63682c..add3bf34e205 100644
--- a/arch/x86/kernel/process_32.c
+++ b/arch/x86/kernel/process_32.c
@@ -75,7 +75,7 @@ EXPORT_PER_CPU_SYMBOL(cpu_number);
75 */ 75 */
76unsigned long thread_saved_pc(struct task_struct *tsk) 76unsigned long thread_saved_pc(struct task_struct *tsk)
77{ 77{
78 return ((unsigned long *)tsk->thread.esp)[3]; 78 return ((unsigned long *)tsk->thread.sp)[3];
79} 79}
80 80
81/* 81/*
@@ -488,10 +488,10 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long sp,
488 childregs->ax = 0; 488 childregs->ax = 0;
489 childregs->sp = sp; 489 childregs->sp = sp;
490 490
491 p->thread.esp = (unsigned long) childregs; 491 p->thread.sp = (unsigned long) childregs;
492 p->thread.esp0 = (unsigned long) (childregs+1); 492 p->thread.sp0 = (unsigned long) (childregs+1);
493 493
494 p->thread.eip = (unsigned long) ret_from_fork; 494 p->thread.ip = (unsigned long) ret_from_fork;
495 495
496 savesegment(gs,p->thread.gs); 496 savesegment(gs,p->thread.gs);
497 497
@@ -718,7 +718,7 @@ struct task_struct fastcall * __switch_to(struct task_struct *prev_p, struct tas
718 /* 718 /*
719 * Reload esp0. 719 * Reload esp0.
720 */ 720 */
721 load_esp0(tss, next); 721 load_sp0(tss, next);
722 722
723 /* 723 /*
724 * Save away %gs. No need to save %fs, as it was saved on the 724 * Save away %gs. No need to save %fs, as it was saved on the
@@ -851,7 +851,7 @@ unsigned long get_wchan(struct task_struct *p)
851 if (!p || p == current || p->state == TASK_RUNNING) 851 if (!p || p == current || p->state == TASK_RUNNING)
852 return 0; 852 return 0;
853 stack_page = (unsigned long)task_stack_page(p); 853 stack_page = (unsigned long)task_stack_page(p);
854 sp = p->thread.esp; 854 sp = p->thread.sp;
855 if (!stack_page || sp < stack_page || sp > top_esp+stack_page) 855 if (!stack_page || sp < stack_page || sp > top_esp+stack_page)
856 return 0; 856 return 0;
857 /* include/asm-i386/system.h:switch_to() pushes bp last. */ 857 /* include/asm-i386/system.h:switch_to() pushes bp last. */