From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 26B56C43334 for ; Fri, 24 Jun 2022 16:58:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=VMZpWs4pucjO3/L7T3Q50HQAD7398qFC2Q8rzFcyf0E=; b=SULj1e+QSw97+r iXAs08JME3MuA5Ac6iS0Yk72Kwept30G36Ms4lmzC/gRTS2qwru+BtsfbZoCdoEQtIweGs+WuQf53 u2hsCdX8r0yc3lKtgX3XeA/x+8CTX6IUcl/6h87j5crmc/cNTiEnB3bthSPCeZgqz7y8od1xrvpAL pYlw1akOm8dC2U/5vYCPo8PIBkXoD3J2+aszLn1Fiq/d9CfCgBjBHCsax38jrzQfVBFyfhKNRRKqg +qM49PjAjj+1kLM42qGHgefJ6qKY2XTFYQbN8iAmrFiYx0xIn7yOh1K6Ickqvn+PJyfEzgkbU40QS IStUcGItstZ8/f+Ax9SA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o4mcN-0035ic-1P; Fri, 24 Jun 2022 16:57:15 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o4mcJ-0035hl-SO for linux-arm-kernel@lists.infradead.org; Fri, 24 Jun 2022 16:57:13 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 6113CB826EE; Fri, 24 Jun 2022 16:57:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 67817C34114; Fri, 24 Jun 2022 16:57:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1656089829; bh=qzQmlXU9jl9HIvqm9uNo4+lGu4eziOd8f1ISFleI8aE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jW7OtfKh6OoDyZP0zZAZzzlDTnpQLMBhsy1XzeweiLzCIZO4GhxfzzfCOtTcuVQFG qcZe75Oi55JkHPpFZQ1metWGD6ySbquTesVNG9V8XsOOQw23CU56nxoPYqo2JI/pch bqrbhDkyJjnfnYHiwEGO+p0bOFWLyuUB/DxG1TR59pDY/Q9qhW9k04ifBlp/FqIsXO QIuAN87IDXohLUlbhUdKYgZeKC0QFNZapsF0byTFmFQY8cWox6oWsoZgEm1dt9dplH o/SFEnNengDAm/x1qCb4sJk3wS9ln4ce6G//HHPjMknkS6owKOn65KRL2PNx5rNayM WQNCvUjymp9sw== Date: Fri, 24 Jun 2022 17:57:04 +0100 From: Will Deacon To: Mark Brown Cc: Catalin Marinas , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v2] arm64/signal: Clean up SVE/SME feature checking inconsistency Message-ID: <20220624165704.GA19442@willie-the-truck> References: <20220624134415.343417-1-broonie@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220624134415.343417-1-broonie@kernel.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220624_095712_117258_37EAE3A1 X-CRM114-Status: GOOD ( 23.36 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Jun 24, 2022 at 02:44:14PM +0100, Mark Brown wrote: > Currently when restoring signal state we check to see if SVE is supported > in restore_sigframe() but check to see if SVE is supported inside > restore_sve_fpsimd_context(). This makes no real difference since SVE is > always supported in systems with SME but looks a bit untidy and makes > things slightly harder to follow, move the SVE check next to the SME one > in restore_sve_fpsimd_context(). > > Signed-off-by: Mark Brown > --- > > v2: > - Add a stub restore_sve_fpsimd_context() to hopefully fix an > allnoconfig issue, I can't reproduce locally. > > arch/arm64/kernel/signal.c | 19 +++++++++++-------- > 1 file changed, 11 insertions(+), 8 deletions(-) > > diff --git a/arch/arm64/kernel/signal.c b/arch/arm64/kernel/signal.c > index b0980fbb6bc7..6b6a79806e82 100644 > --- a/arch/arm64/kernel/signal.c > +++ b/arch/arm64/kernel/signal.c > @@ -280,6 +280,9 @@ static int restore_sve_fpsimd_context(struct user_ctxs *user) > > vl = task_get_sme_vl(current); > } else { > + if (!system_supports_sve()) > + return -EINVAL; > + > vl = task_get_sve_vl(current); > } > > @@ -342,9 +345,13 @@ static int restore_sve_fpsimd_context(struct user_ctxs *user) > > #else /* ! CONFIG_ARM64_SVE */ > > -/* Turn any non-optimised out attempts to use these into a link error: */ > +static int restore_sve_fpsimd_context(struct user_ctxs *user) > +{ > + return 0; > +} Given that this should never be called, should we return an error instead of 0 (or possibly even WARN/BUG)? Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel