From patchwork Tue Nov 7 10:55:48 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: 13448509 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 3339BC4332F for ; Tue, 7 Nov 2023 10:56:33 +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=XriHi/rc7q6NxisWG8V73VMcvGDvo28qbKo0NpV7hlQ=; b=dBKWjFZm6IhLdo 5VomiCwi9AOaKem+gg4zq654UL+Sfe34PXagLCaZQw5Sd0cE7QNDofQE3tZCcU4fJkYa2KuEEJ9e2 SxCIAapM3W7InptjL/cdvcESanPsecOdwiJT+nPfb/J02v7NP604OigyoYRxmxGGaxAsGincAeL1S D+54EbnZuimZVQCuT0zReRkCYkz6IvfDBmTC9tKiCVfVdjwxL7kvExKCcP0HSfZSG0hpRXiSyfZ8I 4Pi3TTVqQBheTpUrd0kmvkqGske7KGJXJvaE1eQv0UIEe85NiwEi63ce8dY/56NtkuwM0UKCccjUu eaN91d7p3Sp9WQmkh91g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r0Jkx-0019Sp-1p; Tue, 07 Nov 2023 10:56:27 +0000 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r0Jko-0019Dj-0F for linux-riscv@lists.infradead.org; Tue, 07 Nov 2023 10:56:22 +0000 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-32f831087c6so1250718f8f.0 for ; Tue, 07 Nov 2023 02:56:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1699354575; x=1699959375; 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=aJyd1YBcb+U2PBneGSdwCeFg8Fe7xoja8XAVvgGr8QM=; b=Ct+8iY+ilorh0EPiZIZ6kUcpfaNuPK0zbYNtOwm9zgYEMzsot2Rd/mbiQHi1Nworgr VdH49F3GL1oxVV5fvMlW+3DUBzh8IJTyAFWLlr0TOtXj+kHaqney4J50wvSBmoMHFoXz HFnx6HD6iBKmBLZA/RnNtDHooPG1xIWN2XwzltJ9Xyvoue7E5z2dqABEOa5N8U6hJMDm WknFlaibzIA1r26QaT5BuKJegKKWuDLUVYh4H7Cl9ecoM7ikFyye3hK84WRfl7Jp/Op/ AJSq1iqnUp1HRjj3u7n5JEr4YTFYvox8LGS4fK2F75qqkw693NQoVbWfcm40biOpFRoy 3yAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699354575; x=1699959375; 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=aJyd1YBcb+U2PBneGSdwCeFg8Fe7xoja8XAVvgGr8QM=; b=sw+uIWaJuw9RJIP7SdR9fgtx/qM6SVLBuYIAKCvGBjlPE77yq73Vqq4BOalVBgybCm 1CRt84iWkI6jFH66U2n8CEG8J3AXfWsfY2NosBKUO4CYJbIj34PhYy4BsmqpDIXHkbPx C+05nlKp+JWBbSZgzdCWAhX7ZOdXF0Q/BjyhdEaEOe6JZ4Gk/m1Ckwm04qI+9/LZ8ymg 3LQeQg1g5NJIBjIQpQAuZfB+08QeZaFvcp/xnOJ9jp1+qo9O+FANn2X3MpYNODe+WF0v c/oCWJLERepO8A/Uy7O0chrndtj5pkiMdrGwTs0efds8J14izxzhJDIcGfsAIj9eY7lG rNdA== X-Gm-Message-State: AOJu0Ywea+ySexzMUGCjHuGhJl3VhbsmnwawiF8KAYfDNZwmbk0zK9vx 03fjTxSPmUNiwIHgZCGte+1aoAYcfnKlKs346FnIEg== X-Google-Smtp-Source: AGHT+IFwqzEm1CRJc3Tvln28fqzLrx5PcA3gU0DPHRFsH47EQLrWlkSUXHW5cbEtNQ1KO6g6dWi35Q== X-Received: by 2002:a05:600c:35d6:b0:404:7606:a871 with SMTP id r22-20020a05600c35d600b004047606a871mr24942179wmq.2.1699354574695; Tue, 07 Nov 2023 02:56:14 -0800 (PST) Received: from carbon-x1.. ([2a01:e0a:999:a3a0:7db3:bdd9:4cab:2ee3]) by smtp.gmail.com with ESMTPSA id n30-20020a05600c501e00b00405442edc69sm15396853wmr.14.2023.11.07.02.56.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Nov 2023 02:56:14 -0800 (PST) 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 , Samuel Ortiz Subject: [PATCH v3 12/20] riscv: add ISA extension parsing for Zihintntl Date: Tue, 7 Nov 2023 11:55:48 +0100 Message-ID: <20231107105556.517187-13-cleger@rivosinc.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231107105556.517187-1-cleger@rivosinc.com> References: <20231107105556.517187-1-cleger@rivosinc.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231107_025618_158372_41C85F07 X-CRM114-Status: UNSURE ( 9.75 ) X-CRM114-Notice: Please train this message. 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 Add parsing for Zihintntl ISA extension[1] that was ratified in commit 0dc91f5 ("Zihintntl is ratified") of riscv-isa-manual[2]. Link: https://drive.google.com/file/d/13_wsN8YmRfH8YWysFyTX-DjTkCnBd9hj/view [1] Link: https://github.com/riscv/riscv-isa-manual/commit/0dc91f505e6d [2] Signed-off-by: Clément Léger Reviewed-by: Evan Green --- arch/riscv/include/asm/hwcap.h | 1 + arch/riscv/kernel/cpufeature.c | 1 + 2 files changed, 2 insertions(+) diff --git a/arch/riscv/include/asm/hwcap.h b/arch/riscv/include/asm/hwcap.h index 10ebd36f67e0..5b57b24db60c 100644 --- a/arch/riscv/include/asm/hwcap.h +++ b/arch/riscv/include/asm/hwcap.h @@ -83,6 +83,7 @@ #define RISCV_ISA_EXT_ZVKT 65 #define RISCV_ISA_EXT_ZFH 66 #define RISCV_ISA_EXT_ZFHMIN 67 +#define RISCV_ISA_EXT_ZIHINTNTL 68 #define RISCV_ISA_EXT_MAX 128 #define RISCV_ISA_EXT_INVALID U32_MAX diff --git a/arch/riscv/kernel/cpufeature.c b/arch/riscv/kernel/cpufeature.c index 7c04c03e435f..baa8edfb0e6a 100644 --- a/arch/riscv/kernel/cpufeature.c +++ b/arch/riscv/kernel/cpufeature.c @@ -258,6 +258,7 @@ const struct riscv_isa_ext_data riscv_isa_ext[] = { __RISCV_ISA_EXT_DATA(zicond, RISCV_ISA_EXT_ZICOND), __RISCV_ISA_EXT_DATA(zicsr, RISCV_ISA_EXT_ZICSR), __RISCV_ISA_EXT_DATA(zifencei, RISCV_ISA_EXT_ZIFENCEI), + __RISCV_ISA_EXT_DATA(zihintntl, RISCV_ISA_EXT_ZIHINTNTL), __RISCV_ISA_EXT_DATA(zihintpause, RISCV_ISA_EXT_ZIHINTPAUSE), __RISCV_ISA_EXT_DATA(zihpm, RISCV_ISA_EXT_ZIHPM), __RISCV_ISA_EXT_DATA(zfh, RISCV_ISA_EXT_ZFH),