aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/vm86_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/vm86_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/vm86_32.c')
-rw-r--r--arch/x86/kernel/vm86_32.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/arch/x86/kernel/vm86_32.c b/arch/x86/kernel/vm86_32.c
index 980e85b90091..e85bb44265cb 100644
--- a/arch/x86/kernel/vm86_32.c
+++ b/arch/x86/kernel/vm86_32.c
@@ -147,10 +147,10 @@ struct pt_regs * fastcall save_v86_state(struct kernel_vm86_regs * regs)
147 } 147 }
148 148
149 tss = &per_cpu(init_tss, get_cpu()); 149 tss = &per_cpu(init_tss, get_cpu());
150 current->thread.esp0 = current->thread.saved_esp0; 150 current->thread.sp0 = current->thread.saved_sp0;
151 current->thread.sysenter_cs = __KERNEL_CS; 151 current->thread.sysenter_cs = __KERNEL_CS;
152 load_esp0(tss, &current->thread); 152 load_sp0(tss, &current->thread);
153 current->thread.saved_esp0 = 0; 153 current->thread.saved_sp0 = 0;
154 put_cpu(); 154 put_cpu();
155 155
156 ret = KVM86->regs32; 156 ret = KVM86->regs32;
@@ -207,7 +207,7 @@ asmlinkage int sys_vm86old(struct pt_regs regs)
207 int tmp, ret = -EPERM; 207 int tmp, ret = -EPERM;
208 208
209 tsk = current; 209 tsk = current;
210 if (tsk->thread.saved_esp0) 210 if (tsk->thread.saved_sp0)
211 goto out; 211 goto out;
212 tmp = copy_vm86_regs_from_user(&info.regs, &v86->regs, 212 tmp = copy_vm86_regs_from_user(&info.regs, &v86->regs,
213 offsetof(struct kernel_vm86_struct, vm86plus) - 213 offsetof(struct kernel_vm86_struct, vm86plus) -
@@ -256,7 +256,7 @@ asmlinkage int sys_vm86(struct pt_regs regs)
256 256
257 /* we come here only for functions VM86_ENTER, VM86_ENTER_NO_BYPASS */ 257 /* we come here only for functions VM86_ENTER, VM86_ENTER_NO_BYPASS */
258 ret = -EPERM; 258 ret = -EPERM;
259 if (tsk->thread.saved_esp0) 259 if (tsk->thread.saved_sp0)
260 goto out; 260 goto out;
261 v86 = (struct vm86plus_struct __user *)regs.cx; 261 v86 = (struct vm86plus_struct __user *)regs.cx;
262 tmp = copy_vm86_regs_from_user(&info.regs, &v86->regs, 262 tmp = copy_vm86_regs_from_user(&info.regs, &v86->regs,
@@ -318,15 +318,15 @@ static void do_sys_vm86(struct kernel_vm86_struct *info, struct task_struct *tsk
318 * Save old state, set default return value (%ax) to 0 318 * Save old state, set default return value (%ax) to 0
319 */ 319 */
320 info->regs32->ax = 0; 320 info->regs32->ax = 0;
321 tsk->thread.saved_esp0 = tsk->thread.esp0; 321 tsk->thread.saved_sp0 = tsk->thread.sp0;
322 tsk->thread.saved_fs = info->regs32->fs; 322 tsk->thread.saved_fs = info->regs32->fs;
323 savesegment(gs, tsk->thread.saved_gs); 323 savesegment(gs, tsk->thread.saved_gs);
324 324
325 tss = &per_cpu(init_tss, get_cpu()); 325 tss = &per_cpu(init_tss, get_cpu());
326 tsk->thread.esp0 = (unsigned long) &info->VM86_TSS_ESP0; 326 tsk->thread.sp0 = (unsigned long) &info->VM86_TSS_ESP0;
327 if (cpu_has_sep) 327 if (cpu_has_sep)
328 tsk->thread.sysenter_cs = 0; 328 tsk->thread.sysenter_cs = 0;
329 load_esp0(tss, &tsk->thread); 329 load_sp0(tss, &tsk->thread);
330 put_cpu(); 330 put_cpu();
331 331
332 tsk->thread.screen_bitmap = info->screen_bitmap; 332 tsk->thread.screen_bitmap = info->screen_bitmap;