From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex =?utf-8?Q?Benn=C3=A9e?= Subject: Re: [PATCH 05/27] arm64: fpsimd: Simplify uses of {set, clear}_ti_thread_flag() Date: Fri, 18 Aug 2017 17:36:27 +0100 Message-ID: <87efs8lto4.fsf@linaro.org> References: <1502280338-23002-1-git-send-email-Dave.Martin@arm.com> <1502280338-23002-6-git-send-email-Dave.Martin@arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from mail-wm0-f51.google.com ([74.125.82.51]:37948 "EHLO mail-wm0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752572AbdHRQga (ORCPT ); Fri, 18 Aug 2017 12:36:30 -0400 Received: by mail-wm0-f51.google.com with SMTP id l19so3939693wmi.1 for ; Fri, 18 Aug 2017 09:36:29 -0700 (PDT) In-reply-to: <1502280338-23002-6-git-send-email-Dave.Martin@arm.com> Sender: linux-arch-owner@vger.kernel.org List-ID: To: Dave Martin Cc: linux-arm-kernel@lists.infradead.org, linux-arch@vger.kernel.org, libc-alpha@sourceware.org, Ard Biesheuvel , Szabolcs Nagy , Catalin Marinas , Will Deacon , Richard Sandiford , kvmarm@lists.cs.columbia.edu Dave Martin 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 Reviewed-by: Alex Bennée > --- > 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); > } > } From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f51.google.com ([74.125.82.51]:37948 "EHLO mail-wm0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752572AbdHRQga (ORCPT ); Fri, 18 Aug 2017 12:36:30 -0400 Received: by mail-wm0-f51.google.com with SMTP id l19so3939693wmi.1 for ; Fri, 18 Aug 2017 09:36:29 -0700 (PDT) References: <1502280338-23002-1-git-send-email-Dave.Martin@arm.com> <1502280338-23002-6-git-send-email-Dave.Martin@arm.com> From: Alex =?utf-8?Q?Benn=C3=A9e?= Subject: Re: [PATCH 05/27] arm64: fpsimd: Simplify uses of {set, clear}_ti_thread_flag() In-reply-to: <1502280338-23002-6-git-send-email-Dave.Martin@arm.com> Date: Fri, 18 Aug 2017 17:36:27 +0100 Message-ID: <87efs8lto4.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: linux-arch-owner@vger.kernel.org List-ID: To: Dave Martin Cc: linux-arm-kernel@lists.infradead.org, linux-arch@vger.kernel.org, libc-alpha@sourceware.org, Ard Biesheuvel , Szabolcs Nagy , Catalin Marinas , Will Deacon , Richard Sandiford , kvmarm@lists.cs.columbia.edu Message-ID: <20170818163627.v9cJxDEGbbH5juxO4cToBZGGjSINIpuOILpeeTbhcBA@z> Dave Martin 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 Reviewed-by: Alex Bennée > --- > 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