From patchwork Tue Nov 14 14:12: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: 13455353 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 3DBEBC4332F for ; Tue, 14 Nov 2023 14:14:08 +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=Yg6lkq4sD0lfmWFtDfzHOTGlMs06dOAPyv63xMr3GKs=; b=QyBFKQ3rMvSUTh 6VqKOdLb/6/uVZnyN4AnneTw+HYsGXwIf8w5ND/YYXuAUKYtrwXiYnYUtpxc/OhS/g/gkhw1sGPj+ rIXDvJPom8N5NkAXfv7S7+CMsjuX5QnO5aXv71hsGVd63N+CwuBSB7edpmswgc8DeU2aOH/CFphZt Lif0Wr8CHLw3QvsAJFqoE9rorFhu5eHsiNcJIsu/DORCHWU1qP5+S/6FW0HyKbg+NL6A8LrEhveXL 4I06m+z07J9Ku9yMCnEB8xfmloXMPEvXyyvYcmsdMCZnh1+LM4oPQC+GjzapWYOAHPN2HDRAL6c7j J2icWirRdaBqLJcroW4Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r2uB0-00G9GG-0Q; Tue, 14 Nov 2023 14:14:02 +0000 Received: from mail-qk1-x72c.google.com ([2607:f8b0:4864:20::72c]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r2uAp-00G91n-3A for linux-riscv@lists.infradead.org; Tue, 14 Nov 2023 14:13:56 +0000 Received: by mail-qk1-x72c.google.com with SMTP id af79cd13be357-77891670417so55612185a.0 for ; Tue, 14 Nov 2023 06:13:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1699971228; x=1700576028; 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=CepaQtX/sdwhUbmZetc41QOoUE9LfFVWHL973vxJ7UQ=; b=xzC6Q3vEcCKGEYmijeX5piZuYXOA0rGO0TqqwJYEqAd7DxtSstR/T5qUKIMV024W/6 cXr1epYDd86n7D0goeJsvE4w4kaFNafdeH4gMonwGuF4tqR70d1KZ2ngrOLSap6dA7Vf qqW7oodzJK5ykbJlKeFcH+PZZlYzZ8KMndb8HKCjziacTxJQ8dPls6/CgG75gn2N3QZZ HEka4mZZR61SboU25Xv8gNCFBPwStR4PZV43TdyCuLZ/qMEI/bVCljB+sF6RT7jOCdZ9 fgQL91/V9P9YVkgU9hGp0PPcQfgCY/y8y2O2PkXyC/b+OY+y4jPeiigsKxKJmkgfNyNR 1l0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699971228; x=1700576028; 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=CepaQtX/sdwhUbmZetc41QOoUE9LfFVWHL973vxJ7UQ=; b=tKMJrKDhf1wEpdIibsbE4zhZmyzC2E1492aIpHUs+owyKhwELOE6X7oz3Rsg4/hBGE Qdr7rkfyIqHdXjtvVfprERdmwTxcp4Q0gNNMkobUPdpBvfLyuK59ERK6UNZXlLB4AyPR Fs3bS4pol3iYl+Ups1+rhYavMggGz/FYPqjBP99CW5XO3MX/M4tjo6yPQXC8eN+W7CXC HFAsJmWzPR+tTLQiezx23Nvnq8DM3gzcDSX9Xdea2ZmOfDt/3YUvVTF7yHYRx4yaNi1Y nJ9HOgp7Zaca2lWINRsJEkaqZoGGDnLcPaN8oPUgsFsItNuK4oMJmnGgKjo12/vbNgS1 wdWg== X-Gm-Message-State: AOJu0Yza0IB2c13PGi41X+guKWm7DBNI9/tQ8qFcJZihvbYyf9WETqkp HlDsRn6pQy+j3ylRXpa5qqjtJIFKTSArUU8S2iI02Q== X-Google-Smtp-Source: AGHT+IF7WevyrXd//n4lH0ZEXB0TDnFlHM3i203ryiy76OKa7Bcf589Sc/lKHJHt3RYWXfpjbdBHtw== X-Received: by 2002:a05:620a:31a8:b0:77a:69a1:b6a3 with SMTP id bi40-20020a05620a31a800b0077a69a1b6a3mr3097387qkb.1.1699971228077; Tue, 14 Nov 2023 06:13:48 -0800 (PST) Received: from carbon-x1.. ([12.186.190.2]) by smtp.gmail.com with ESMTPSA id m2-20020a05620a220200b00777611164c5sm2701263qkh.106.2023.11.14.06.13.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Nov 2023 06:13:47 -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 , Jerry Shih Subject: [PATCH v4 12/20] riscv: add ISA extension parsing for Zihintntl Date: Tue, 14 Nov 2023 09:12:48 -0500 Message-ID: <20231114141256.126749-13-cleger@rivosinc.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231114141256.126749-1-cleger@rivosinc.com> References: <20231114141256.126749-1-cleger@rivosinc.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231114_061352_060079_C1BA0D14 X-CRM114-Status: UNSURE ( 9.54 ) 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 6a6ee93a3c9a..97d106fa0f54 100644 --- a/arch/riscv/include/asm/hwcap.h +++ b/arch/riscv/include/asm/hwcap.h @@ -80,6 +80,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 7182cf278b1c..e73ee4cfd84a 100644 --- a/arch/riscv/kernel/cpufeature.c +++ b/arch/riscv/kernel/cpufeature.c @@ -256,6 +256,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),