extern int fpstate_alloc(struct fpu *fpu);
extern void fpstate_free(struct fpu *fpu);
-extern int fpu__copy(struct task_struct *dst, struct task_struct *src);
+extern int fpu__copy(struct fpu *dst_fpu, struct fpu *src_fpu);
static inline unsigned long
alloc_mathframe(unsigned long sp, int ia32_frame, unsigned long *buf_fx,
}
}
-int fpu__copy(struct task_struct *dst, struct task_struct *src)
+int fpu__copy(struct fpu *dst_fpu, struct fpu *src_fpu)
{
- struct fpu *dst_fpu = &dst->thread.fpu;
- struct fpu *src_fpu = &src->thread.fpu;
-
- dst->thread.fpu.counter = 0;
- dst->thread.fpu.has_fpu = 0;
- dst->thread.fpu.state = NULL;
- dst->thread.fpu.last_cpu = -1;
+ dst_fpu->counter = 0;
+ dst_fpu->has_fpu = 0;
+ dst_fpu->state = NULL;
+ dst_fpu->last_cpu = -1;
if (src_fpu->fpstate_active) {
int err = fpstate_alloc(dst_fpu);
{
*dst = *src;
- return fpu__copy(dst, src);
+ return fpu__copy(&dst->thread.fpu, &src->thread.fpu);
}
void arch_release_task_struct(struct task_struct *tsk)