Skip to content

Commit

Permalink
arm64: fpsimd: Simplify uses of {set,clear}_ti_thread_flag()
Browse files Browse the repository at this point in the history
The existing FPSIMD context switch code contains a couple of
instances of {set,clear}_ti_thread(task_thread_info(task)).  Since
there are thread flag manipulators that operate directly on
task_struct, this verbosity isn't strictly needed.

For consistency, this patch simplifies the affected calls.  This
should have no impact on behaviour.

Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
  • Loading branch information
Dave Martin authored and Will Deacon committed Nov 3, 2017
1 parent 38b9aeb commit 9cf5b54
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions arch/arm64/kernel/fpsimd.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,9 @@ void fpsimd_thread_switch(struct task_struct *next)

if (__this_cpu_read(fpsimd_last_state) == st
&& st->cpu == smp_processor_id())
clear_ti_thread_flag(task_thread_info(next),
TIF_FOREIGN_FPSTATE);
clear_tsk_thread_flag(next, TIF_FOREIGN_FPSTATE);
else
set_ti_thread_flag(task_thread_info(next),
TIF_FOREIGN_FPSTATE);
set_tsk_thread_flag(next, TIF_FOREIGN_FPSTATE);
}
}

Expand Down

0 comments on commit 9cf5b54

Please sign in to comment.