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 30B4AC4345F for ; Wed, 1 May 2024 20:16:08 +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-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-Transfer-Encoding:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=/PEgBXTUgA/5MwGawiG11KdUTewVz/2i5bQnp6Q07RA=; b=3ZpTQBUEvZT59iLcvVBLSCdL2c gc4EVlAatiZW69me+I6yy/MxhbMVlebWPtQBydzU/NJeesGr8Dp/JUe3UY2paCyNRNsg3haMPH/GR j9SWQieq/FoNO2povIqRCfwc4b7k7niRy7O1C62NlHjtGKLc4enRku5ARR8FUMorpDqoXjdeAp+En WGKirZ3QNoRHNgG9Wtc7zLTHaJhpLFAW6nvTdgFXPEew8il/VUnZJKJwy4A0Q4li8jHoUM+vFC9iZ +VHpasXItsFdeo6/SduvAPSSr1Kl3mcLdJFsstg+p3w/foCoGfR41h/jE+YsIQIOGAuNa8A0E3KrU MyL9lYLQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s2GMs-0000000AcLd-1s5Y; Wed, 01 May 2024 20:15:54 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s2GMq-0000000AcKH-19W8; Wed, 01 May 2024 20:15:53 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 073EA619C4; Wed, 1 May 2024 20:15:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 32582C4AF19; Wed, 1 May 2024 20:15:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714594550; bh=B1Uh4i07qA042YiuAtEnhpGxy0d/YEecRVrlZr0WYw0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=nwu2J1/hBd8nUQDpUcCUvBJ/iE2Tt854m42ww+YyLzdRcPUswOq5X0ben9BhtzqeC KOKuGrC9hV5ugEltMpZ9LOWNXx7IyJ5ph2DcYQNxdfLLfODQruyozQYBAm8PdX5uCd yTaCg1bca1vKUTibNb9AFHiToLHamAtXOTlRaeXrgWVlm/yDrZONGe8lu5d69xM6Wp Z62GETam1wKiei04yhW3bFHttlICDuVo6oap1jc0+w9TIxqKGdDD52njjkMnNW8rA5 8pUAQwLGgMJvnnOX1fzvEk4w6i/tgDG4PVqALPi6mG841Jf3Hoep8sSx9ZeeXav/4V 3eUPthzU83tnA== Date: Wed, 1 May 2024 21:15:44 +0100 From: Conor Dooley To: Charlie Jenkins Cc: Rob Herring , Krzysztof Kozlowski , Paul Walmsley , Palmer Dabbelt , Albert Ou , Guo Ren , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Conor Dooley , Evan Green , =?iso-8859-1?Q?Cl=E9ment_L=E9ger?= , Jonathan Corbet , Shuah Khan , linux-riscv@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Palmer Dabbelt , linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: Re: [PATCH v4 07/16] riscv: cpufeature: Extract common elements from extension checking Message-ID: <20240501-hazy-reformist-8ff36ba53450@spud> References: <20240426-dev-charlie-support_thead_vector_6_9-v4-0-b692f3c516ec@rivosinc.com> <20240426-dev-charlie-support_thead_vector_6_9-v4-7-b692f3c516ec@rivosinc.com> <20240501-probable-unfunded-746ef6ae1853@spud> MIME-Version: 1.0 In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240501_131552_444918_AB988427 X-CRM114-Status: GOOD ( 25.83 ) 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: multipart/mixed; boundary="===============5307554082270271902==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============5307554082270271902== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="GXUDSiAct5jPEsjU" Content-Disposition: inline --GXUDSiAct5jPEsjU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, May 01, 2024 at 12:48:13PM -0700, Charlie Jenkins wrote: > On Wed, May 01, 2024 at 12:37:14PM +0100, Conor Dooley wrote: > > On Fri, Apr 26, 2024 at 02:29:21PM -0700, Charlie Jenkins wrote: > > > The __riscv_has_extension_likely() and __riscv_has_extension_unlikely= () > > > functions from the vendor_extensions.h can be used to simplify the > > > standard extension checking code as well. Migrate those functions to > > > cpufeature.h and reorganize the code in the file to use the functions. > > >=20 > > > Signed-off-by: Charlie Jenkins > > > --- > > > arch/riscv/include/asm/cpufeature.h | 78 +++++++++++++++++---= ---------- > > > arch/riscv/include/asm/vendor_extensions.h | 28 ----------- > > > 2 files changed, 44 insertions(+), 62 deletions(-) > > >=20 > > > diff --git a/arch/riscv/include/asm/cpufeature.h b/arch/riscv/include= /asm/cpufeature.h > > > index fedd479ccfd1..17896ec9ec11 100644 > > > --- a/arch/riscv/include/asm/cpufeature.h > > > +++ b/arch/riscv/include/asm/cpufeature.h > > > @@ -98,59 +98,66 @@ extern bool riscv_isa_fallback; > > > =20 > > > unsigned long riscv_isa_extension_base(const unsigned long *isa_bitm= ap); > > > =20 > > > +#define EXT_ALL_VENDORS 0 > >=20 > > It's not really "all vendors", it's standard. Otherwise, this seems all >=20 > This hooks up into the alternatives: >=20 > ALTERNATIVE("nop", "j %l[l_yes]", %[vendor], %[ext], 1) Yeah, I know what you're using it for, I just find the naming odd. >=20 > Where the "vendor" argument is supposed to be 0 if the alternative is > applicable to all vendors. Is there a better way to convey this? s/EXT_ALL_VENDORS/STANDARD_EXT/? --GXUDSiAct5jPEsjU Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZjKi7wAKCRB4tDGHoIJi 0pu+AP9hEmGvtiSYMRVj8J8qm6vSD21SfEYfsPIhrXHI3zAnRwEAtYpy2rqHQbrU hC4o62eJA24pmjxdVcu266GkK87+ywA= =wAFW -----END PGP SIGNATURE----- --GXUDSiAct5jPEsjU-- --===============5307554082270271902== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============5307554082270271902==--