From patchwork Wed Oct 11 11:14:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= X-Patchwork-Id: 13417327 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 E3D52CD6E63 for ; Wed, 11 Oct 2023 12:30:52 +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:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=eWcRbNjvrLWous3Rd58CBPbQu+7qqpemwglF/fnSp2o=; b=CREeMHw70D+oAw go6ZdSMdiz9SUkhuHF2yb1ac8i+wTMEbtzkEgC+vR38LIfEbyr++cs/Zf+TaqqEaVMhnEnFkyqjZt z5zsFxqKAld7yQkAV0enEwJe73mYvBDGvcmDKrinvHMT4cQ99JVGp+d21yKqwQRui1RX1dhlxCTG2 c4PfG/WDwWNr7ds+eDLulmpoEwdtSbDLxKXqdx7bOiUKaAFRqz6kgj0JB4vA8QfAqDegOKQqkhOzn iYBVC0z50uksSRg28+n5D8xYzgW4vRMUhT9Ay3MezfWGJr55sRB+f9XDU81TpI+SLgNNMH5BRidUi pWeeodRslVEFcxjPuyXg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qqYMF-00FqpR-25; Wed, 11 Oct 2023 12:30:35 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qqXFR-00FjNH-05 for linux-riscv@bombadil.infradead.org; Wed, 11 Oct 2023 11:19:29 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:Content-Type :MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Sender:Reply-To:Content-ID:Content-Description; bh=4tXTHfOF9l2oA3bnmaAaKSnwfTQRRdZhw8v+5/SMqC8=; b=nkw8OyXHZXoh1KqylJ6xZ5gQai DTrBWdfVI0XF1TKg3d28ZOSqKB5uoFJO8WZr2Ow74J4MBI6jtJMtc1tQLAPoukwfe8Emuh4wAuTpV oDVOFqZlDg01HZnGtqqHu3P9MOj4KdVPp3VLcUi0qCeGRtLmlwVjjS2rtWLFtG7cu+gXU2O5ZF07B 7U4k4evNj3zIHCFWCrRLADKrfkzqklp11ozNHbDfplfc2MItKIHj0UMwXv3TS/XSjw0e4IMzXKef3 n/+eXnAWsejMoFcTspKZmjIhID8v8N5LNkqYyjE9FwU4PrtgWIKxnBtZ3DvbAtXG8nV/D0P7vc9wP A7csCHPw==; Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by desiato.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qqXFL-000A25-1y for linux-riscv@lists.infradead.org; Wed, 11 Oct 2023 11:19:27 +0000 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-405e48d8e72so11541415e9.0 for ; Wed, 11 Oct 2023 04:19:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1697023163; x=1697627963; darn=lists.infradead.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=4tXTHfOF9l2oA3bnmaAaKSnwfTQRRdZhw8v+5/SMqC8=; b=yIJq7zbdu+xpOlI050ZJgu4WSVbOxNniLvKTKWKVRFOLUyOJaW2Ph1OmwHYMOEeWtF u0u+BkvsdgHgeu4glrlCxpDVFlOpIUY2ciHWffIWceq2YZR0tc4T6K4pKqfC4So7E4ri mrt9X8Zvbt4UdPbh+kL7DK+96+yumBaZNKYhS5WuepVuZ34j+axkwbibNR6FaIfdIdvp SkJMYzpTKOrRfE/URKxIIStTuR9w1x/5GkqGPMhSaF5+h26FjcUPIClKQ1bjJvqU2pDC ZQtaO6Hk/Xyi75RL57Sb7rh6NyiSGXBSxS49KDivj8xYy6cEmL/kjpPH2rTXFXgTw8zH RIIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697023163; x=1697627963; 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=4tXTHfOF9l2oA3bnmaAaKSnwfTQRRdZhw8v+5/SMqC8=; b=qJ3ciJTMak65HLwQXkdRG55m9T+GNOqBo1xVlFrFSXOccaRYCvHNtyFyVMHkyVsgnx 7MEvJyU/rPuoDytAtRqdJM5kWWLD+lrUXUJKfduRFxwnCslPA4YEx1SOfMB3OO/4Gx34 znzkWz95P8nNFCB+4eEPLVfIGJ48ILmY1n95O1gQpXD9nKDYx7UuBhlk8YnD3vys5hTb hE0oGfvzZ5Lds/emm0Rvrumo3D6pscGcqkiIRIG64Ja5OBUlqUkJHBExKiRDUQRiPTFD 7C775HWc0X4ajkv9mfuPhLwPN+AzC3bbRQWnkwkzj5sBC5p2IUqXOSYtUso3+XTP7Wbt LW/g== X-Gm-Message-State: AOJu0YyOVG3ysDjXOboO0A9Tc8rtZZLEjNQxQqPhf9gyuHjsPPIB2FU8 6hE11mgiywGSkmzFcVB/kjrhNm+DnamIGkzK3MMCdQ== X-Google-Smtp-Source: AGHT+IGArMLkH9j0nR6q6ZxQVwuBHeskjOjNvD5ZUnKc5yiKkdCwzXcWhurTv5ALmG1Vajfi3OEIlw== X-Received: by 2002:a05:600c:3c96:b0:403:334:fb0d with SMTP id bg22-20020a05600c3c9600b004030334fb0dmr18654577wmb.4.1697023162835; Wed, 11 Oct 2023 04:19:22 -0700 (PDT) Received: from carbon-x1.. ([2a01:e0a:999:a3a0:9134:b302:d8b:a200]) by smtp.gmail.com with ESMTPSA id a4-20020a05600c224400b003fe2b081661sm18945715wmm.30.2023.10.11.04.19.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 04:19:22 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= To: linux-riscv@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org Cc: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= , Palmer Dabbelt , Paul Walmsley , Rob Herring , Krzysztof Kozlowski , Albert Ou , Jonathan Corbet , Andrew Jones , Evan Green , Conor Dooley Subject: [PATCH v1 09/13] riscv: hwprobe: export Zhintntl ISA extension Date: Wed, 11 Oct 2023 13:14:34 +0200 Message-ID: <20231011111438.909552-10-cleger@rivosinc.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231011111438.909552-1-cleger@rivosinc.com> References: <20231011111438.909552-1-cleger@rivosinc.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231011_121925_357079_53AB837C X-CRM114-Status: GOOD ( 10.68 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org Export Zihintntl extension[1] through hwprobe. [1] https://drive.google.com/file/d/13_wsN8YmRfH8YWysFyTX-DjTkCnBd9hj/view Signed-off-by: Clément Léger --- Documentation/riscv/hwprobe.rst | 3 +++ arch/riscv/include/uapi/asm/hwprobe.h | 1 + arch/riscv/kernel/sys_riscv.c | 1 + 3 files changed, 5 insertions(+) diff --git a/Documentation/riscv/hwprobe.rst b/Documentation/riscv/hwprobe.rst index 06f49a095f19..a577b1d72dff 100644 --- a/Documentation/riscv/hwprobe.rst +++ b/Documentation/riscv/hwprobe.rst @@ -131,6 +131,9 @@ The following keys are defined: * :c:macro:`RISCV_HWPROBE_EXT_ZFHMIN`: The Zfhmin extension version 1.0 is supported as defined in the RISC-V ISA manual. + * :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_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 c9016abf099e..3c4aa5d01f93 100644 --- a/arch/riscv/include/uapi/asm/hwprobe.h +++ b/arch/riscv/include/uapi/asm/hwprobe.h @@ -47,6 +47,7 @@ struct riscv_hwprobe { #define RISCV_HWPROBE_EXT_ZVKT (1 << 21) #define RISCV_HWPROBE_EXT_ZFH (1 << 22) #define RISCV_HWPROBE_EXT_ZFHMIN (1 << 23) +#define RISCV_HWPROBE_EXT_ZIHINTNTL (1 << 24) #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 da916981934b..ca17829f3e16 100644 --- a/arch/riscv/kernel/sys_riscv.c +++ b/arch/riscv/kernel/sys_riscv.c @@ -156,6 +156,7 @@ static void hwprobe_isa_ext0(struct riscv_hwprobe *pair, CHECK_ISA_EXT(ZBA); CHECK_ISA_EXT(ZBB); CHECK_ISA_EXT(ZBS); + CHECK_ISA_EXT(ZIHINTNTL); if (has_vector()) { CHECK_ISA_EXT(ZVBB);