Skip to content

Commit

Permalink
arm64: kernel thread don't need to save fpsimd context.
Browse files Browse the repository at this point in the history
kernel thread's default fpsimd state is zero. When fork a thread, if parent is kernel thread,
 and save hardware context to parent's fpsimd state, but this hardware context is user
process's context, because kernel thread don't use fpsimd, it will not introduce issue,
it add a little cost.

Signed-off-by: Janet Liu <janet.liu@spreadtrum.com>
Signed-off-by: Chunyan Zhang <chunyan.zhang@spreadtrum.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
  • Loading branch information
Janet Liu authored and Catalin Marinas committed Jun 11, 2015
1 parent 04d7e09 commit 6eb6c80
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/arm64/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,8 @@ void release_thread(struct task_struct *dead_task)

int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src)
{
fpsimd_preserve_current_state();
if (current->mm)
fpsimd_preserve_current_state();
*dst = *src;
return 0;
}
Expand Down

0 comments on commit 6eb6c80

Please sign in to comment.