|
@@ -51,7 +51,7 @@ static int preserve_fpsimd_context(struct fpsimd_context __user *ctx)
|
|
|
int err;
|
|
|
|
|
|
/* dump the hardware registers to the fpsimd_state structure */
|
|
|
- fpsimd_save_state(fpsimd);
|
|
|
+ fpsimd_preserve_current_state();
|
|
|
|
|
|
/* copy the FP and status/control registers */
|
|
|
err = __copy_to_user(ctx->vregs, fpsimd->vregs, sizeof(fpsimd->vregs));
|
|
@@ -86,11 +86,8 @@ static int restore_fpsimd_context(struct fpsimd_context __user *ctx)
|
|
|
__get_user_error(fpsimd.fpcr, &ctx->fpcr, err);
|
|
|
|
|
|
/* load the hardware registers from the fpsimd_state structure */
|
|
|
- if (!err) {
|
|
|
- preempt_disable();
|
|
|
- fpsimd_load_state(&fpsimd);
|
|
|
- preempt_enable();
|
|
|
- }
|
|
|
+ if (!err)
|
|
|
+ fpsimd_update_current_state(&fpsimd);
|
|
|
|
|
|
return err ? -EFAULT : 0;
|
|
|
}
|