Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 212039
b: refs/heads/master
c: 10c11f3
h: refs/heads/master
i:
  212037: 006c310
  212035: 2242077
  212031: ec08ebc
v: v3
  • Loading branch information
Brian Gerst authored and H. Peter Anvin committed Sep 9, 2010
1 parent fc30105 commit 56d619e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a4d4fbc7735bba6654b20f859135f9d3f8fe7f76
refs/heads/master: 10c11f304986a1f84201c2261a428701f9d2dffc
18 changes: 8 additions & 10 deletions trunk/arch/x86/kernel/i387.c
Original file line number Diff line number Diff line change
Expand Up @@ -389,19 +389,17 @@ convert_from_fxsr(struct user_i387_ia32_struct *env, struct task_struct *tsk)
#ifdef CONFIG_X86_64
env->fip = fxsave->rip;
env->foo = fxsave->rdp;
/*
* should be actually ds/cs at fpu exception time, but
* that information is not available in 64bit mode.
*/
env->fcs = task_pt_regs(tsk)->cs;
if (tsk == current) {
/*
* should be actually ds/cs at fpu exception time, but
* that information is not available in 64bit mode.
*/
asm("mov %%ds, %[fos]" : [fos] "=r" (env->fos));
asm("mov %%cs, %[fcs]" : [fcs] "=r" (env->fcs));
savesegment(ds, env->fos);
} else {
struct pt_regs *regs = task_pt_regs(tsk);

env->fos = 0xffff0000 | tsk->thread.ds;
env->fcs = regs->cs;
env->fos = tsk->thread.ds;
}
env->fos |= 0xffff0000;
#else
env->fip = fxsave->fip;
env->fcs = (u16) fxsave->fcs | ((u32) fxsave->fop << 16);
Expand Down

0 comments on commit 56d619e

Please sign in to comment.