diff options
author | H. Peter Anvin <hpa@zytor.com> | 2008-01-30 07:31:02 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-01-30 07:31:02 -0500 |
commit | faca62273b602ab482fb7d3d940dbf41ef08b00e (patch) | |
tree | 913fb1c565a2b719b00ae4b745c38cc9b0ebf279 /arch/x86/kernel/process_64.c | |
parent | 25149b62d3e6a3e737af39bd4a0b4e97de0811b7 (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_64.c')
-rw-r--r-- | arch/x86/kernel/process_64.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c index efbb1a2eab97..238193822e23 100644 --- a/arch/x86/kernel/process_64.c +++ b/arch/x86/kernel/process_64.c | |||
@@ -493,9 +493,9 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long sp, | |||
493 | if (sp == ~0UL) | 493 | if (sp == ~0UL) |
494 | childregs->sp = (unsigned long)childregs; | 494 | childregs->sp = (unsigned long)childregs; |
495 | 495 | ||
496 | p->thread.rsp = (unsigned long) childregs; | 496 | p->thread.sp = (unsigned long) childregs; |
497 | p->thread.rsp0 = (unsigned long) (childregs+1); | 497 | p->thread.sp0 = (unsigned long) (childregs+1); |
498 | p->thread.userrsp = me->thread.userrsp; | 498 | p->thread.usersp = me->thread.usersp; |
499 | 499 | ||
500 | set_tsk_thread_flag(p, TIF_FORK); | 500 | set_tsk_thread_flag(p, TIF_FORK); |
501 | 501 | ||
@@ -607,7 +607,7 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p) | |||
607 | /* | 607 | /* |
608 | * Reload esp0, LDT and the page table pointer: | 608 | * Reload esp0, LDT and the page table pointer: |
609 | */ | 609 | */ |
610 | tss->rsp0 = next->rsp0; | 610 | tss->sp0 = next->sp0; |
611 | 611 | ||
612 | /* | 612 | /* |
613 | * Switch DS and ES. | 613 | * Switch DS and ES. |
@@ -666,8 +666,8 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p) | |||
666 | /* | 666 | /* |
667 | * Switch the PDA and FPU contexts. | 667 | * Switch the PDA and FPU contexts. |
668 | */ | 668 | */ |
669 | prev->userrsp = read_pda(oldrsp); | 669 | prev->usersp = read_pda(oldrsp); |
670 | write_pda(oldrsp, next->userrsp); | 670 | write_pda(oldrsp, next->usersp); |
671 | write_pda(pcurrent, next_p); | 671 | write_pda(pcurrent, next_p); |
672 | 672 | ||
673 | write_pda(kernelstack, | 673 | write_pda(kernelstack, |
@@ -769,9 +769,9 @@ unsigned long get_wchan(struct task_struct *p) | |||
769 | if (!p || p == current || p->state==TASK_RUNNING) | 769 | if (!p || p == current || p->state==TASK_RUNNING) |
770 | return 0; | 770 | return 0; |
771 | stack = (unsigned long)task_stack_page(p); | 771 | stack = (unsigned long)task_stack_page(p); |
772 | if (p->thread.rsp < stack || p->thread.rsp > stack+THREAD_SIZE) | 772 | if (p->thread.sp < stack || p->thread.sp > stack+THREAD_SIZE) |
773 | return 0; | 773 | return 0; |
774 | fp = *(u64 *)(p->thread.rsp); | 774 | fp = *(u64 *)(p->thread.sp); |
775 | do { | 775 | do { |
776 | if (fp < (unsigned long)stack || | 776 | if (fp < (unsigned long)stack || |
777 | fp > (unsigned long)stack+THREAD_SIZE) | 777 | fp > (unsigned long)stack+THREAD_SIZE) |