struct user_i387_struct;
extern int fpstate_alloc_init(struct task_struct *curr);
+extern void fpstate_init(struct fpu *fpu);
-extern void fpu_finit(struct fpu *fpu);
extern int dump_fpu(struct pt_regs *, struct user_i387_struct *);
extern void math_state_restore(void);
eager_fpu_init();
}
-void fpu_finit(struct fpu *fpu)
+void fpstate_init(struct fpu *fpu)
{
if (!cpu_has_fpu) {
finit_soft_fpu(&fpu->state->soft);
fp->fos = 0xffff0000u;
}
}
-EXPORT_SYMBOL_GPL(fpu_finit);
+EXPORT_SYMBOL_GPL(fpstate_init);
int fpstate_alloc(struct fpu *fpu)
{
if (ret)
return ret;
- fpu_finit(&curr->thread.fpu);
+ fpstate_init(&curr->thread.fpu);
/* Safe to do for the current task: */
curr->flags |= PF_USED_MATH;
if (ret)
return ret;
- fpu_finit(&child->thread.fpu);
+ fpstate_init(&child->thread.fpu);
/* Safe to do for stopped child tasks: */
child->flags |= PF_USED_MATH;
if (__copy_from_user(&fpu->state->xsave, buf_fx, state_size) ||
__copy_from_user(&env, buf, sizeof(env))) {
- fpu_finit(fpu);
+ fpstate_init(fpu);
err = -1;
} else {
sanitize_restored_xstate(tsk, &env, xstate_bv, fx_only);
if (err)
return err;
- fpu_finit(&vcpu->arch.guest_fpu);
+ fpstate_init(&vcpu->arch.guest_fpu);
if (cpu_has_xsaves)
vcpu->arch.guest_fpu.state->xsave.xsave_hdr.xcomp_bv =
host_xcr0 | XSTATE_COMPACTION_ENABLED;