Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp3150661rdg; Tue, 17 Oct 2023 06:16:58 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGZE3NO8ojRFb/CeSXdZKXqUuuWq+jSjaSktlctqD6y/Tb8GyW9CHHnqoST5O+C4Fdhih+r X-Received: by 2002:a05:6a20:549e:b0:17a:e2dd:ea3f with SMTP id i30-20020a056a20549e00b0017ae2ddea3fmr2310060pzk.55.1697548617757; Tue, 17 Oct 2023 06:16:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697548617; cv=none; d=google.com; s=arc-20160816; b=z6UJ/W671a54i/WCqzrvr19smkLyf7z8KTc5Sw9tMyBW1TRsoqc/XKzW1JgBKcPbg3 x+mLWnDJjHY/jI+OBECQOMChL+CqTNRTp6Tkka2Mus/r/cPqWa1KlOzN0xVuyeIJXrGD Zvgl5QuVBuP33WzqS09EW396JKhDA63cLfh5Jr7YJdG9dBTSkVPVEEgOCWuyVB7mRIVE aDFVuMnYAXvGZ+S0J0/WLl5bsHlTJ9p1Tx8fBzT+FCBRvlaNFlU5TdQpc0NMGmJDX2kF S3tbdnkEepupfPS+WlC5UvYs8Kcc0yUkZuMRdUKE0glh7NGGSig0WMe6RakCb30AdWyC OdlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=U2m+45j3rbdaE2NY5Ol9kX9V97sFwlFvtbz4uSqqCuM=; fh=lvGFqwUxN+Dx1jonz8cRGrvjuKDcjMXylffmtrJGOYA=; b=HBmIBEqsUnMur04+aWQd3gsC8J1gg1/22Rsb7m++aOB97d7AyVaFpLhR2XqScGvsch jkX/ODm6BBchUr6AH/5A44KP2QuxYAwRsn+c+sitk8bW4opEefm/hMgNNbWNvwWBHsAy 1F/61MZrXdZzC9fYaLGN33qiqxg1ja4PKmj/kpMFGaB13q2D0ohntEZs10u87FgzpXPv c2rdYq+XhVZ/w+PlVfb9VXIXnKaENyCnDleD70EzVtQ+FF3onbTXsX3mysZ6s7EOlLT8 4QVxGUMPy/gFhqrOgBvILIBVp+C8wxEjX3pM2yVlwVSrp4gBJsh71J7znhXJlL7YeobT hP4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=ComVT4Rg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id t15-20020a63954f000000b005b7e21d9cb2si1798212pgn.419.2023.10.17.06.16.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Oct 2023 06:16:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=ComVT4Rg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 6A587801CCE1; Tue, 17 Oct 2023 06:16:55 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343874AbjJQNQc (ORCPT + 99 others); Tue, 17 Oct 2023 09:16:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234968AbjJQNPw (ORCPT ); Tue, 17 Oct 2023 09:15:52 -0400 Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC726ED for ; Tue, 17 Oct 2023 06:15:44 -0700 (PDT) Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-407acb21f27so736095e9.0 for ; Tue, 17 Oct 2023 06:15:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1697548542; x=1698153342; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=U2m+45j3rbdaE2NY5Ol9kX9V97sFwlFvtbz4uSqqCuM=; b=ComVT4RglsIdNqywtVJS5Xicunw98kWgC3QgQOl67r8wz5l50QaQQNivyIux9OSGPJ ptUs/R6spZLljlX3hZHi9ySrk2d1FQR210DUIfEtPjJwaUbvZ/hwDJxsEWns6F/eP9t4 0R/XkGHdTjj4n363g45uerHPqTYxYQJlOpVSQyTkiaqBAUEl2wAl+k9JpCj3Km+OpJxN 0fzRRYwxhv0PITyl0MzHm1ijLr1PGVx+G8B43Xg0Kk/BMw3glkC9OIT+11tC34SoSQfb K2KXkJmOc6wdX0df4EL8VCT3XyNF6caMIExbzQr3ullS2KN5Ge/CqHJsVFRHvnhodwFZ OTew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697548542; x=1698153342; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=U2m+45j3rbdaE2NY5Ol9kX9V97sFwlFvtbz4uSqqCuM=; b=RMjChhsZ4Qpv2r7tclC5HDjklFVQrCQThNM1g7f/6Fii4vG6TFbNttC/+OqmQuZcMf g+ONRp/mJWNWdmXG8BJYcUqUaG99NupM6in2YjA7ooE6v8hu9O8gqZINgxv0YTmZ9Csx Ngv/W/dSBQRijs30m/kfTbfQnpK4P7Y7vo6n67EuN/9ywjtVFk0+vCUHonGq9mCyqQE4 6qS17G9UbzY7Q2fRrJ+y7MXKP2pT70uJXcLhrMgAFWglkbQze4uu5IMzz6GhQL/GlQAq zRFL9UPYIw1evYT0L5sjNaqC/jC4MMpDdjP7w0jfxTSTVy0CkDKYk0Ui/Rdc8Mz2ACfX +hxA== X-Gm-Message-State: AOJu0YwFIZp3fBv1RX2vfV4Q00LCzVcFKP6gKS9+n7J+CiLwaihm1hud Vtrx9Aqv34PhKqFuIo7Vf+A8fQ== X-Received: by 2002:a05:600c:929:b0:405:39bb:38a8 with SMTP id m41-20020a05600c092900b0040539bb38a8mr1653730wmp.2.1697548541300; Tue, 17 Oct 2023 06:15:41 -0700 (PDT) Received: from carbon-x1.. ([2a01:e0a:999:a3a0:96:820c:ecf7:a817]) by smtp.gmail.com with ESMTPSA id fj7-20020a05600c0c8700b0040772138bb7sm9873393wmb.2.2023.10.17.06.15.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Oct 2023 06:15:40 -0700 (PDT) From: =?UTF-8?q?Cl=C3=A9ment=20L=C3=A9ger?= To: linux-riscv@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org Cc: =?UTF-8?q?Cl=C3=A9ment=20L=C3=A9ger?= , Palmer Dabbelt , Paul Walmsley , Rob Herring , Krzysztof Kozlowski , Albert Ou , Jonathan Corbet , Andrew Jones , Evan Green , Conor Dooley , Samuel Ortiz Subject: [PATCH v2 15/19] riscv: hwprobe: export Zvfh[min] ISA extensions Date: Tue, 17 Oct 2023 15:14:52 +0200 Message-ID: <20231017131456.2053396-16-cleger@rivosinc.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231017131456.2053396-1-cleger@rivosinc.com> References: <20231017131456.2053396-1-cleger@rivosinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Tue, 17 Oct 2023 06:16:55 -0700 (PDT) Export Zvfh[min] ISA extension[1] through hwprobe. Link: https://drive.google.com/file/d/1_Yt60HGAf1r1hx7JnsIptw0sqkBd9BQ8/view [1] Signed-off-by: Clément Léger --- Documentation/riscv/hwprobe.rst | 8 ++++++++ arch/riscv/include/uapi/asm/hwprobe.h | 2 ++ arch/riscv/kernel/sys_riscv.c | 2 ++ 3 files changed, 12 insertions(+) diff --git a/Documentation/riscv/hwprobe.rst b/Documentation/riscv/hwprobe.rst index 9c909e0d5316..782ac26cb92a 100644 --- a/Documentation/riscv/hwprobe.rst +++ b/Documentation/riscv/hwprobe.rst @@ -146,6 +146,14 @@ The following keys are defined: * :c:macro:`RISCV_HWPROBE_EXT_ZIHINTNTL`: The Zihintntl extension version 1.0 is supported as defined in the RISC-V ISA manual. + * :c:macro:`RISCV_HWPROBE_EXT_ZVFH`: The Zvfh extension is supported as + defined in the RISC-V Vector manual starting from commit e2ccd0548d6c + ("Remove draft warnings from Zvfh[min]"). + + * :c:macro:`RISCV_HWPROBE_EXT_ZVFHMIN`: The Zvfhmin extension is supported as + defined in the RISC-V Vector manual starting from commit e2ccd0548d6c + ("Remove draft warnings from Zvfh[min]"). + * :c:macro:`RISCV_HWPROBE_KEY_CPUPERF_0`: A bitmask that contains performance information about the selected set of processors. diff --git a/arch/riscv/include/uapi/asm/hwprobe.h b/arch/riscv/include/uapi/asm/hwprobe.h index dc4eaa978ad1..79407010952a 100644 --- a/arch/riscv/include/uapi/asm/hwprobe.h +++ b/arch/riscv/include/uapi/asm/hwprobe.h @@ -52,6 +52,8 @@ struct riscv_hwprobe { #define RISCV_HWPROBE_EXT_ZFH (1 << 26) #define RISCV_HWPROBE_EXT_ZFHMIN (1 << 27) #define RISCV_HWPROBE_EXT_ZIHINTNTL (1 << 28) +#define RISCV_HWPROBE_EXT_ZVFH (1 << 29) +#define RISCV_HWPROBE_EXT_ZVFHMIN (1 << 30) #define RISCV_HWPROBE_KEY_CPUPERF_0 5 #define RISCV_HWPROBE_MISALIGNED_UNKNOWN (0 << 0) #define RISCV_HWPROBE_MISALIGNED_EMULATED (1 << 0) diff --git a/arch/riscv/kernel/sys_riscv.c b/arch/riscv/kernel/sys_riscv.c index 84daaf6ed4a1..8d6edd721627 100644 --- a/arch/riscv/kernel/sys_riscv.c +++ b/arch/riscv/kernel/sys_riscv.c @@ -185,6 +185,8 @@ static void hwprobe_isa_ext0(struct riscv_hwprobe *pair, CHECK_ISA_EXT(ZVKSED); CHECK_ISA_EXT(ZVKSH); CHECK_ISA_EXT(ZVKT); + CHECK_ISA_EXT(ZVFH); + CHECK_ISA_EXT(ZVFHMIN); } if (has_fpu()) { -- 2.42.0