|
@@ -886,8 +886,10 @@ void kernel_neon_begin(void)
|
|
|
__this_cpu_write(kernel_neon_busy, true);
|
|
|
|
|
|
/* Save unsaved task fpsimd state, if any: */
|
|
|
- if (current->mm && !test_and_set_thread_flag(TIF_FOREIGN_FPSTATE))
|
|
|
- fpsimd_save_state(¤t->thread.fpsimd_state);
|
|
|
+ if (current->mm) {
|
|
|
+ task_fpsimd_save();
|
|
|
+ set_thread_flag(TIF_FOREIGN_FPSTATE);
|
|
|
+ }
|
|
|
|
|
|
/* Invalidate any task state remaining in the fpsimd regs: */
|
|
|
__this_cpu_write(fpsimd_last_state, NULL);
|