Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp710976lqm; Wed, 1 May 2024 13:15:58 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXSJrzDM2RAAr1ibguBd4Jq7HFjpck7iRvAbY1wFHv9B+O2/ObD73pdHAoHDVz/JFD/36C7KQXuTXzQDaHJQpzGGdlKk4mBM7X5WkRljw== X-Google-Smtp-Source: AGHT+IE3S+2YbZsiQPPNOtPxlmq2o/Oi/+aRMFxestr+eBC05CzWl6iU/x+nY8qBTrw6ZnYoTjC+ X-Received: by 2002:a17:906:c314:b0:a58:8d37:a5d2 with SMTP id s20-20020a170906c31400b00a588d37a5d2mr2210769ejz.42.1714594558234; Wed, 01 May 2024 13:15:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714594558; cv=pass; d=google.com; s=arc-20160816; b=lppmf/lAKIBQbttTnJE9KZ/CHAo78H7jG2Q4F8PFywrJpK5ElcNzn2INau38fpXlal TTBOQ+PyE3K3rxzstk6eWVe+Xc7RCd8/Ikjen/HZ/elAfIJmpaW0e6O1lhkZfIkyW9F5 HBeyFhj+GXBB3SoYpHTxPru2y36DH6SV6zGg/VrpvWOCFVQXmPCaBxgqrRuXv55J37fW FwFZB136r99qaPs4hIOgomFoIJbB1F7AO8W2ltrUqsCkqoWADhONYwCRoDSLKIsmuWXv alqhn+hjCypEXauVsWEnP+IhhwE0HokXrPFDiI2Uonb4+SFRepfxI2KXai2ZmdsV8j5o ZhfQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=MdFl3+EN8esGukf843IGurabB0ekJuhnZpSwmuSLWB8=; fh=mBwwpQbay9vhzTgPULjjDn+LkmwbaBeNVRczdYQ/Av4=; b=RIVl3N4HCRiYDTI/pFk6rRLZzLr+DfxFYrGEpC4CMnHOjKIIvo7InNrANQbjJ9o0ev LSM+ieP682mmoRsOboF13fA67Ss+makzbQ8BXlwEHUu6A9r2rf5NI39vm6YzD7SnLhs3 SH5UXwWwTHqVkWqfv4/kd+nn9TzmVvtcy+o9wYxhTQ9FdoK+ARtvraHl7I2K2bIor3SO T0rXiIbraKH/kYhNSVeoQD7qCPrNOAUoEcnHSj5hbfdd9b+7yieqFlbo2oeGQat0M8Oj ZQJgoqOOb7W+qQ6PXQlXpqfYHoJHs/E6E7n1E05+A2VtR1/BtQ7I1Lhpxek+nsl7iSte aA+g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="nwu2J1/h"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-165742-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-165742-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id c7-20020a170906154700b00a523b0516cfsi16886579ejd.757.2024.05.01.13.15.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 May 2024 13:15:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-165742-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="nwu2J1/h"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-165742-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-165742-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id F36141F21525 for ; Wed, 1 May 2024 20:15:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1DE111635BC; Wed, 1 May 2024 20:15:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="nwu2J1/h" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 326835B69E; Wed, 1 May 2024 20:15:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714594551; cv=none; b=bCmgdqEmsL5P18shOzwQde8vp4BaWCdJrJdjIfm5nacxkT6yVk8ccWPRpo7mVN3M0Q7NNaLfT/6vKLCLYywwInv7lOwos3Dwx+Rz725+gw1N9z8toiiwnSwiWNY5HEcGR1S/+UcKTez2E2nC1Za/OwLLDg2QdyIl/9R3XG928UI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714594551; c=relaxed/simple; bh=B1Uh4i07qA042YiuAtEnhpGxy0d/YEecRVrlZr0WYw0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=phUO/6mT/45zDJZKOJQ8dVdWbju2fsePsJOIe3eLMj/3JVpxJyNQlbyCLTjAR/GAk+mHU70Lau3q7+dD4c5cihapT+NkiNuR4KRpSDp53Tx1t1E+KmvOvXbbmd65TqA2fsfJaGGGywKeU6Duoxk2KZO3V73BkaXPPDELt18P5QE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=nwu2J1/h; arc=none smtp.client-ip=10.30.226.201 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="GXUDSiAct5jPEsjU" Content-Disposition: inline In-Reply-To: --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--