aboutsummaryrefslogtreecommitdiff
path: root/arch/arm64/kernel/signal.c
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2014-06-26 10:50:14 +0100
committerMark Brown <broonie@linaro.org>2014-06-26 10:50:14 +0100
commitafe6ba0684ab75f5ee0306689e58b8b488319451 (patch)
tree20e659b8c8319cfe8c46b0ef93037e1dacbd5f8f /arch/arm64/kernel/signal.c
parent713c7153774c6b8b4cdc5bb13a0616e1f8ce7d0e (diff)
parent9580f7022362bf717457b6b73de1e0ed0fede211 (diff)
Merge branch 'linux-linaro-lsk' into linux-linaro-lsk-androidlsk-android-14.06
Diffstat (limited to 'arch/arm64/kernel/signal.c')
-rw-r--r--arch/arm64/kernel/signal.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/arch/arm64/kernel/signal.c b/arch/arm64/kernel/signal.c
index bbc1aad21ce6..e3cf09626245 100644
--- a/arch/arm64/kernel/signal.c
+++ b/arch/arm64/kernel/signal.c
@@ -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_preserve_current_state();
+ fpsimd_save_state(fpsimd);
/* copy the FP and status/control registers */
err = __copy_to_user(ctx->vregs, fpsimd->vregs, sizeof(fpsimd->vregs));
@@ -86,8 +86,11 @@ 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)
- fpsimd_update_current_state(&fpsimd);
+ if (!err) {
+ preempt_disable();
+ fpsimd_load_state(&fpsimd);
+ preempt_enable();
+ }
return err ? -EFAULT : 0;
}
@@ -420,8 +423,4 @@ asmlinkage void do_notify_resume(struct pt_regs *regs,
clear_thread_flag(TIF_NOTIFY_RESUME);
tracehook_notify_resume(regs);
}
-
- if (thread_flags & _TIF_FOREIGN_FPSTATE)
- fpsimd_restore_current_state();
-
}