aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/i387.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/i387.c')
-rw-r--r--arch/x86/kernel/i387.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/x86/kernel/i387.c b/arch/x86/kernel/i387.c
index 763dfc407232..d2e39e69aaf8 100644
--- a/arch/x86/kernel/i387.c
+++ b/arch/x86/kernel/i387.c
@@ -132,7 +132,7 @@ int xfpregs_get(struct task_struct *target, const struct user_regset *regset,
132 if (!cpu_has_fxsr) 132 if (!cpu_has_fxsr)
133 return -ENODEV; 133 return -ENODEV;
134 134
135 unlazy_fpu(target); 135 init_fpu(target);
136 136
137 return user_regset_copyout(&pos, &count, &kbuf, &ubuf, 137 return user_regset_copyout(&pos, &count, &kbuf, &ubuf,
138 &target->thread.i387.fxsave, 0, -1); 138 &target->thread.i387.fxsave, 0, -1);
@@ -147,7 +147,7 @@ int xfpregs_set(struct task_struct *target, const struct user_regset *regset,
147 if (!cpu_has_fxsr) 147 if (!cpu_has_fxsr)
148 return -ENODEV; 148 return -ENODEV;
149 149
150 unlazy_fpu(target); 150 init_fpu(target);
151 set_stopped_child_used_math(target); 151 set_stopped_child_used_math(target);
152 152
153 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, 153 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf,
@@ -261,7 +261,7 @@ static void convert_from_fxsr(struct user_i387_ia32_struct *env,
261 } 261 }
262#else 262#else
263 env->fip = fxsave->fip; 263 env->fip = fxsave->fip;
264 env->fcs = fxsave->fcs; 264 env->fcs = (u16) fxsave->fcs | ((u32) fxsave->fop << 16);
265 env->foo = fxsave->foo; 265 env->foo = fxsave->foo;
266 env->fos = fxsave->fos; 266 env->fos = fxsave->fos;
267#endif 267#endif
@@ -307,7 +307,7 @@ int fpregs_get(struct task_struct *target, const struct user_regset *regset,
307 if (!HAVE_HWFP) 307 if (!HAVE_HWFP)
308 return fpregs_soft_get(target, regset, pos, count, kbuf, ubuf); 308 return fpregs_soft_get(target, regset, pos, count, kbuf, ubuf);
309 309
310 unlazy_fpu(target); 310 init_fpu(target);
311 311
312 if (!cpu_has_fxsr) 312 if (!cpu_has_fxsr)
313 return user_regset_copyout(&pos, &count, &kbuf, &ubuf, 313 return user_regset_copyout(&pos, &count, &kbuf, &ubuf,
@@ -332,7 +332,7 @@ int fpregs_set(struct task_struct *target, const struct user_regset *regset,
332 if (!HAVE_HWFP) 332 if (!HAVE_HWFP)
333 return fpregs_soft_set(target, regset, pos, count, kbuf, ubuf); 333 return fpregs_soft_set(target, regset, pos, count, kbuf, ubuf);
334 334
335 unlazy_fpu(target); 335 init_fpu(target);
336 set_stopped_child_used_math(target); 336 set_stopped_child_used_math(target);
337 337
338 if (!cpu_has_fxsr) 338 if (!cpu_has_fxsr)