Received: by 2002:a05:6500:1b45:b0:1f5:f2ab:c469 with SMTP id cz5csp1207113lqb; Thu, 18 Apr 2024 03:27:27 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWFWFwJxpkXW0Lxxb6HeLWwuxn40vpUqcf793npUT+9pk8zsLGINOJErovdhLYOsHz1R9yLn0fAcBC7sAr/DIrZjuZ5qhIOFiW8pF50jQ== X-Google-Smtp-Source: AGHT+IGwKev2PfZfzvMM2JqvjiG84/1R1mUuXbgJmb5lMUWweQlg5//2OZYdVUGbMZmqI/sG1uWi X-Received: by 2002:a17:902:654b:b0:1e2:578:2c32 with SMTP id d11-20020a170902654b00b001e205782c32mr2310718pln.0.1713436047376; Thu, 18 Apr 2024 03:27:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713436047; cv=pass; d=google.com; s=arc-20160816; b=iOLZ71P7PcC2dsve/1CoSOWPdfBqHm3Yw573tidmPvo+gW36y8jDvF5QWwvGeZOPc1 KE2pQFXXvYh8clhvPSm5ciHXTM5yJJM1/l6SOy0zByncAsF3kljcam64j+l47g+pgxcC ur0JpyekE1Wo8erwmiGj/fhpP7E6QUWniIU1KX1tFR4heKRCy3fMpUe0sgbkAXC/VuYi 1pu0eQOqOdJnDTAghlNz0QAHN2G8SX3PKjXPTXJM2FbQ/XguHI5JgMRWGhOCr0L9eZMi bTS32TrY9bWQjQ7+HpEOmP7Mkkpq0TU3BTueF2t/HvL3nUc5s+wQKSZ3xWVJiashJ+uy Dl/g== 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=9qGQjRmqclR9v8LshUpGNz06tEDiq0HW5Rf2vJ83Fgw=; fh=CPsmOzCfVlAP8dR7BWxb7YcogGpBFmQ0cT6PFKMoHnA=; b=zvaCtXLzf1/tMFHLMqkm8qcXIohsvpVgisAmx1RZzlxGOQ+njFGKw8lK0z/kEkg93L p7+QUouOD13A81ecvSu1DBnKyJXbXHZRVVm6VKg9b66gZT6U0DkBohXKYtt6mKqHsufU 4lcuj7ctR9Xm4UJwtFHvqmokPuBHCoqYD5irvLM9mbyNhswQuFra/aeRUpiiBFupff9l SZbCZQ2Q/M55YVHEjy4mrc79hgfyceoOnBeSLwHnKzs0Dw+raDM1Zc/LHDDPbhmWyBOh 9IlvyxLAbN6TUeaWg15JFjSKpCdF1TptoLfOh9ztdeGI0SRpoKq9ZNKjKLTxEts1Lsij Nn7Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=lBfJr998; arc=pass (i=1 spf=pass spfdomain=microchip.com dkim=pass dkdomain=microchip.com dmarc=pass fromdomain=microchip.com); spf=pass (google.com: domain of linux-kernel+bounces-149871-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-149871-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microchip.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id c7-20020a170902724700b001e3fadbd18esi1121705pll.388.2024.04.18.03.27.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Apr 2024 03:27:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-149871-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=lBfJr998; arc=pass (i=1 spf=pass spfdomain=microchip.com dkim=pass dkdomain=microchip.com dmarc=pass fromdomain=microchip.com); spf=pass (google.com: domain of linux-kernel+bounces-149871-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-149871-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microchip.com 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id BC1C3285346 for ; Thu, 18 Apr 2024 10:20:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B766515CD4E; Thu, 18 Apr 2024 10:20:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="lBfJr998" Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) (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 5D35915AAD9; Thu, 18 Apr 2024 10:20:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=68.232.153.233 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713435638; cv=none; b=e1JIpZEXQSpfmvALV9/BTv56KyD//0ql/PO6doGqIfVnVwQOgsqoU4ds49JNevoaewlcZn2yn6WnA5ZWFKpC211ScJpsdGUAy8dgq3tAExDWyAmmRGBVVYk3zRdyaNN7UHwxZ8BJvfDM3zOX6CyLLsc66WwQv61Mtd39fDTmkrg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713435638; c=relaxed/simple; bh=WeZBsDuQNwuqcLLzHGYml04J8M2UBghlloEStXX5BnI=; h=Date:From:To:CC:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=jIuGirsDHCMKvi1Hb09PcDUjDeOXEmjfJtklZXA1lP+TaZRe+cGgy/n5vV5YMYd4ug/SGLpxZzdYyt0u0AoIszXoFsNSVowT7UuevHdWB8rlrjg1+djoLR7DvBXTyB77VJ5xRgPrJfQkwpSL8aJiYHN4dTSA3xJooRLx/rscO2E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com; spf=pass smtp.mailfrom=microchip.com; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b=lBfJr998; arc=none smtp.client-ip=68.232.153.233 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=microchip.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1713435638; x=1744971638; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=WeZBsDuQNwuqcLLzHGYml04J8M2UBghlloEStXX5BnI=; b=lBfJr998QU6G49TtDoYms07MqTLjXbStrvi+L8TZZT/S+S/HYrJ0QiY+ Xi7UIxD7CeLWzTztRAoAnktT20RcTlERkBj92oTZATI8EhYr5QP5mDTS4 6SsdbgXFlKIdZCFbL+/55Qf5gQZWEtx4HQ5ByFbhq0X2IbZI/Hq9yyo0M AZvAQaBrAiqkIc0WRfBPwNY1EPaNRRYdojtd1SslvsA8vq8EjmyiOigRS bUb/tNWBn2fAqdqb1OhAD1+WUHN4sbWaix2jP180/mt6tPy4Z/tKkcQ2k zdLmtObft514/T4fuV6lq+j0xEnK48cGrqjJPAQf8r/XUsZb55BGEJOsn g==; X-CSE-ConnectionGUID: Uj/C6BjUSJ27K3aZQSHGBQ== X-CSE-MsgGUID: XKQFOuaVQ5mdX7qWs3qYiA== X-IronPort-AV: E=Sophos;i="6.07,211,1708412400"; d="asc'?scan'208";a="21586426" X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa3.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 18 Apr 2024 03:20:36 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Thu, 18 Apr 2024 03:20:13 -0700 Received: from wendy (10.10.85.11) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Thu, 18 Apr 2024 03:20:10 -0700 Date: Thu, 18 Apr 2024 11:19:55 +0100 From: Conor Dooley To: Andy Chiu CC: Paul Walmsley , Palmer Dabbelt , Albert Ou , Heiko Stuebner , Guo Ren , Conor Dooley , Rob Herring , Krzysztof Kozlowski , Jonathan Corbet , Evan Green , =?iso-8859-1?Q?Cl=E9ment_L=E9ger?= , Shuah Khan , , , Palmer Dabbelt , Vincent Chen , Greentime Hu , , , Subject: Re: [PATCH v4 4/9] riscv: cpufeature: add zve32[xf] and zve64[xfd] isa detection Message-ID: <20240418-legged-catfish-8358cbe836de@wendy> References: <20240412-zve-detection-v4-0-e0c45bb6b253@sifive.com> <20240412-zve-detection-v4-4-e0c45bb6b253@sifive.com> 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="/qVfv2QvWwihzlW8" Content-Disposition: inline In-Reply-To: <20240412-zve-detection-v4-4-e0c45bb6b253@sifive.com> --/qVfv2QvWwihzlW8 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Apr 12, 2024 at 02:49:00PM +0800, Andy Chiu wrote: > Multiple Vector subextensions are added. Also, the patch takes care of > the dependencies of Vector subextensions by macro expansions. So, if > some "embedded" platform only reports "zve64f" on the ISA string, the > parser is able to expand it to zve32x zve32f zve64x and zve64f. >=20 > Signed-off-by: Andy Chiu > --- > Changelog v3: > - renumber RISCV_ISA_EXT_ZVE* to rebase on top of 6.9 > - alphabetically sort added extensions (Cl=E9ment) > Changelog v2: > - remove the extension itself from its isa_exts[] list (Cl=E9ment) > - use riscv_zve64d_exts for v's extension list (Samuel) > --- > arch/riscv/include/asm/hwcap.h | 5 +++++ > arch/riscv/kernel/cpufeature.c | 36 +++++++++++++++++++++++++++++++++++- > 2 files changed, 40 insertions(+), 1 deletion(-) >=20 > diff --git a/arch/riscv/include/asm/hwcap.h b/arch/riscv/include/asm/hwca= p.h > index e17d0078a651..f64d4e98e67c 100644 > --- a/arch/riscv/include/asm/hwcap.h > +++ b/arch/riscv/include/asm/hwcap.h > @@ -81,6 +81,11 @@ > #define RISCV_ISA_EXT_ZTSO 72 > #define RISCV_ISA_EXT_ZACAS 73 > #define RISCV_ISA_EXT_XANDESPMU 74 > +#define RISCV_ISA_EXT_ZVE32X 75 > +#define RISCV_ISA_EXT_ZVE32F 76 > +#define RISCV_ISA_EXT_ZVE64X 77 > +#define RISCV_ISA_EXT_ZVE64F 78 > +#define RISCV_ISA_EXT_ZVE64D 79 > =20 > #define RISCV_ISA_EXT_XLINUXENVCFG 127 > =20 > diff --git a/arch/riscv/kernel/cpufeature.c b/arch/riscv/kernel/cpufeatur= e.c > index f6f3ece60d69..38d09de518b1 100644 > --- a/arch/riscv/kernel/cpufeature.c > +++ b/arch/riscv/kernel/cpufeature.c > @@ -188,6 +188,35 @@ static const unsigned int riscv_zvbb_exts[] =3D { > RISCV_ISA_EXT_ZVKB > }; > =20 > +#define RISCV_ISA_EXT_ZVE32F_IMPLY_LIST \ > + RISCV_ISA_EXT_ZVE32X, Not really a reason to have a list here, there's only one thing implied. Otherwise, Reviewed-by: Conor Dooley Cheers, Conor. --/qVfv2QvWwihzlW8 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZiDzywAKCRB4tDGHoIJi 0snJAP9A1H3tdsAfC7x0n4uxmjKhN/QLFEqxtSbHh0TO3ExpQAD/eEqf5L56+de7 S/eSP6FR8y3aqB7ZO3o55fQW/xkj4A8= =38Nm -----END PGP SIGNATURE----- --/qVfv2QvWwihzlW8--