From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from foss.arm.com ([217.140.101.70]:34324 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751587AbeFTJVL (ORCPT ); Wed, 20 Jun 2018 05:21:11 -0400 Date: Wed, 20 Jun 2018 10:21:07 +0100 From: Dave Martin To: Mark Rutland Cc: marc.zyngier@arm.com, catalin.marinas@arm.com, will.deacon@arm.com, linux@dominikbrodowski.net, hch@infradead.org, james.morse@arm.com, viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCHv3 10/19] arm64: convert native/compat syscall entry to C Message-ID: <20180620092105.GT22983@e103592.cambridge.arm.com> References: <20180618120310.39527-1-mark.rutland@arm.com> <20180618120310.39527-11-mark.rutland@arm.com> <20180619121814.GR22983@e103592.cambridge.arm.com> <20180619130932.ww53s5rnragcodha@lakrids.cambridge.arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180619130932.ww53s5rnragcodha@lakrids.cambridge.arm.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Tue, Jun 19, 2018 at 02:15:24PM +0100, Mark Rutland wrote: > On Tue, Jun 19, 2018 at 01:18:17PM +0100, Dave Martin wrote: > > On Mon, Jun 18, 2018 at 01:03:01PM +0100, Mark Rutland wrote: > > > +static inline void sve_user_reset(void) > > > +{ > > > > Can we call this "sve_user_discard" please? > > > > "Reset" is a reasonable name for the concept, but the "discard" > > terminology has been used elsewhere. > > Sure; done. > > > > + if (!system_supports_sve()) > > > + return; > > > + > > > + /* > > > + * task_fpsimd_load() won't be called to update CPACR_EL1 in > > > + * ret_to_user unless TIF_FOREIGN_FPSTATE is still set, which only > > > + * happens if a context switch or kernel_neon_begin() or context > > > + * modification (sigreturn, ptrace) intervenes. > > > + * So, ensure that CPACR_EL1 is already correct for the fast-path case. > > > + */ > > > > This comment should go after clear_thead_flag(), since it describes not > > the purpose of this function but the presence of sve_user_disable(). > > > > > + clear_thread_flag(TIF_SVE); > > > + sve_user_disable(); > > > +} > > Good point. I've moved the clear_thread_flag(TIF_SVE) above the comment > (with a blank line before the comment). Thanks -- with those changes: Reviewed-by: Dave Martin (for the SVE parts) Cheers ---Dave