Message ID | 1502280338-23002-6-git-send-email-Dave.Martin@arm.com |
---|---|
State | New |
Headers | show |
On 9 August 2017 at 13:05, Dave Martin <Dave.Martin@arm.com> wrote: > 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> Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> > --- > arch/arm64/kernel/fpsimd.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/arch/arm64/kernel/fpsimd.c b/arch/arm64/kernel/fpsimd.c > index 138fcfa..9c1f268e 100644 > --- a/arch/arm64/kernel/fpsimd.c > +++ b/arch/arm64/kernel/fpsimd.c > @@ -159,11 +159,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); > } > } > > -- > 2.1.4 >
Dave Martin <Dave.Martin@arm.com> writes: > 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> > --- > arch/arm64/kernel/fpsimd.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/arch/arm64/kernel/fpsimd.c b/arch/arm64/kernel/fpsimd.c > index 138fcfa..9c1f268e 100644 > --- a/arch/arm64/kernel/fpsimd.c > +++ b/arch/arm64/kernel/fpsimd.c > @@ -159,11 +159,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); > } > } -- Alex Bennée
diff --git a/arch/arm64/kernel/fpsimd.c b/arch/arm64/kernel/fpsimd.c index 138fcfa..9c1f268e 100644 --- a/arch/arm64/kernel/fpsimd.c +++ b/arch/arm64/kernel/fpsimd.c @@ -159,11 +159,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); } }
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> --- arch/arm64/kernel/fpsimd.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)