Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp1446837lqa; Mon, 29 Apr 2024 08:40:50 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWiAsH2cK1HSb05jvBMv+Eh7MReevFsiYGz4mkXHsiYx1obl/Kxh4op9IbNlJJdfXs5t16faIoxbfqO4UJ2sz5CWEYIJv8pWtkHtgWdEA== X-Google-Smtp-Source: AGHT+IHlNrXJjje6Z7/y/7qPdESxP9Orl00a6QzYwt1p/wefgIeOlEJ9gE3T2DNhmJd1yEwo5p/9 X-Received: by 2002:a05:6a21:3405:b0:1a7:9476:6cb9 with SMTP id yn5-20020a056a21340500b001a794766cb9mr7447921pzb.32.1714405249685; Mon, 29 Apr 2024 08:40:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714405249; cv=pass; d=google.com; s=arc-20160816; b=jiBfCAeOMllhTX96zJdsHpSzYn5mCNSd6BvXE9e8bgwbtthWfrD4iz0cLR7tgY/vzE Olc0SsWsYD5Eso6IuCVIZg6ZHuVfi+++iC+wNZwPtSFT4WYrTqk743vuHhbK/ftsGnLm 5FxsP6OC7hAcB6d7QJiP2emn2AV56EicuKduzRqEyG93A4wSIYMH0CLO82sO2y6rZtUm z+Uq7rJR1DVS7qvP4K8Pt8aG51UO2iIpv2ZUpzbQdDxqcHvcknvZwBSAlZBD38vL2imx up9lQP+P9Kr1f5DJzw8YQz8to3xnb8i2zpewrjKfE43OdMox0rp+VjgK7KAGlz61ns/b eOPA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=cQHXVYsUJGkXAyoSx2aDU2oA4c+tlzZFdLvDimlX5cw=; fh=+PYarwslgdXk9FmRVoAf8OThuXKTorrsa3f2k1NjRYc=; b=gACbLyh+u0FMIk2Zc1HZlsvzNo4XgfFu2CNtmYqGVlapkAzlOboOZ+S4/cX5+LfKjw 4HQvQQQ/zoN3wen4w0WkctWvJZf2SvuWU+E2eGvdYidAepuXqiqe5QmzSfyEJxV6PcE1 9KRrU0aNbphySra8cfijfZTF9e4wmKGPrYs6T33TEHvN2k5hoa1WDoxIv3Gl28Pc/nyz Xo17z4qkSnT87dc9TqIiy1W7OpP978jRQf7/UoQDHWMDetjEPiUUThBKa7U2p+b/eyH0 drcbdCRs3QtiHs32CRhddtUtkggq3bQ5Jcl+p3Kv4PHkkaK9b0apwvST15ZKyf1/HVkt V09w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=S528nEJJ; arc=pass (i=1 spf=pass spfdomain=rivosinc.com dkim=pass dkdomain=rivosinc-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-162547-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-162547-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id e1-20020a656781000000b0060473c501d6si11019277pgr.459.2024.04.29.08.40.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Apr 2024 08:40:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-162547-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=S528nEJJ; arc=pass (i=1 spf=pass spfdomain=rivosinc.com dkim=pass dkdomain=rivosinc-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-162547-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-162547-linux.lists.archive=gmail.com@vger.kernel.org" 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id AB2F7B224DD for ; Mon, 29 Apr 2024 15:16:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AF09E86130; Mon, 29 Apr 2024 15:06:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b="S528nEJJ" Received: from mail-lj1-f175.google.com (mail-lj1-f175.google.com [209.85.208.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 12D88130A48 for ; Mon, 29 Apr 2024 15:06:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.175 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714403205; cv=none; b=kZRe74N+rKIZVXKiyE8bU41cweRsdkJSyC14ws9VSYNMlP6bPefGJj7pLATNgiVVTmcTGkktm8wtEJcmBJUjsXudgrAd37Hd4E7xmC/VeM/Qf44AwY292oEyzmfNHFidWwTBhjxbQcC4fU2KFbX/QbHj/7x/BL9FPlJzjRZJj5A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714403205; c=relaxed/simple; bh=awZzvOfeihP/zQBwulZo2fkHpvheuFzo9+sGOB1HlhQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Ce7mT6RjuxVEBOgxMLwsG9ZO3NokFzKpEQS/3UhR5U6SW5EnPw4SnrsGC5QRNEsNdWZfLRfZrcRNdEMVmgv5rJiRfRJVbhTQjRGaO2AO4794Zgel54gdKq/161KhvwwdeGQEhDWzd8cL9vaBI8iW8b7LXWywnMgWSaKBjkcoSfQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com; spf=pass smtp.mailfrom=rivosinc.com; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b=S528nEJJ; arc=none smtp.client-ip=209.85.208.175 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rivosinc.com Received: by mail-lj1-f175.google.com with SMTP id 38308e7fff4ca-2ddb69a9747so628811fa.3 for ; Mon, 29 Apr 2024 08:06:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1714403202; x=1715008002; 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=cQHXVYsUJGkXAyoSx2aDU2oA4c+tlzZFdLvDimlX5cw=; b=S528nEJJuVc/ifgNZ4CM3gYn0p5kQA7gZNENBrsSghE92Sj26A/1SSBJBqVhtZNeh/ J9lEvaCTBbiXiGF4DxPLgU6bCabt/3ngfL7EJ2oAvRgMEEjulbAnuFvkVXtM3e3H1yAr gGMPtgjlfzCmST+gYzBzL7rGQQEj3KhLzLKpX60bQnC7XeK3SOQm4KKxIsSz0XckQd1K YZ4CFJvwik/xtvoz73aMdsEtUgljll5/qA95DYD+y/9ObG2GufT7Awxbi3S6/2cUR5ey tV6hfECq9+cEUGBo8QnNQyMGssrqnITCBFuVI0F69YZdsFFqwsQW+fc19lMke4SQdTB7 XcHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714403202; x=1715008002; 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=cQHXVYsUJGkXAyoSx2aDU2oA4c+tlzZFdLvDimlX5cw=; b=Pk0hP1MxtoGnHpaL5KU0Qmg991Bp4OO/M5JPd2i0JdXG0ha00HBxnsPe1TlGD+Gr5V sT5QkBMW54EZp5aF8bEdht5zuLO50qQx1hr7wivqPVgZVhzXOPAlhXmPcCOo7atl9tvq 8bbO7WN4BbAakd69gyHZzLhoDiYY4sz2UPcoy4q1rwpLuLBzH1dstP6Nx+WKlbop+0la uRQAzKCFCp6hEmRhcBclcFrYzrI1xGnjKAnygSsGNFpzqtyaETDU2SrkK3nRKVCtDH9/ YS0jwBBOOvOqjKHz8OUBioQ+XLCY4jHoyp1ncUSYguwiaWSQZpMOyozwznZx2QPNEdlq nMQQ== X-Forwarded-Encrypted: i=1; AJvYcCXcXNfLvq4GPd9LFNHGSFq6+OUL1WcqYtCV/6T5tKVccYY/yu3FRO7Nfd5NY4ivcI6vilXOJnj7/NZJ5pw+0IZ2QNFjew50OsHaB2li X-Gm-Message-State: AOJu0YzvVlBoABra6xnVhoJjYtXozfd7Ifhg32LL/zI+XtOs0f3DnbOr fAJ0Agb+FFUZTEwpX4XaW99hHpRMQ1gdPhdPJgrdpjDjRmePCh4EBpyyCFxDTFU= X-Received: by 2002:a2e:9ad4:0:b0:2de:1457:9d22 with SMTP id p20-20020a2e9ad4000000b002de14579d22mr7307292ljj.0.1714403200338; Mon, 29 Apr 2024 08:06:40 -0700 (PDT) Received: from carbon-x1.. ([2a01:e0a:999:a3a0:2fec:d20:2b60:e334]) by smtp.gmail.com with ESMTPSA id l23-20020a05600c1d1700b00418f99170f2sm39646638wms.32.2024.04.29.08.06.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Apr 2024 08:06:40 -0700 (PDT) From: =?UTF-8?q?Cl=C3=A9ment=20L=C3=A9ger?= To: Jonathan Corbet , Paul Walmsley , Palmer Dabbelt , Albert Ou , Conor Dooley , Rob Herring , Krzysztof Kozlowski , Anup Patel , Shuah Khan Cc: =?UTF-8?q?Cl=C3=A9ment=20L=C3=A9ger?= , Atish Patra , linux-doc@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, kvm@vger.kernel.org, kvm-riscv@lists.infradead.org, linux-kselftest@vger.kernel.org Subject: [PATCH v4 08/11] riscv: add ISA extension parsing for Zcmop Date: Mon, 29 Apr 2024 17:05:01 +0200 Message-ID: <20240429150553.625165-9-cleger@rivosinc.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240429150553.625165-1-cleger@rivosinc.com> References: <20240429150553.625165-1-cleger@rivosinc.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add parsing for Zcmop ISA extension which was ratified in commit b854a709c00 ("Zcmop is ratified/1.0") of the riscv-isa-manual. Signed-off-by: Clément Léger --- 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 b7551bad341b..cff7660de268 100644 --- a/arch/riscv/include/asm/hwcap.h +++ b/arch/riscv/include/asm/hwcap.h @@ -86,6 +86,7 @@ #define RISCV_ISA_EXT_ZCB 77 #define RISCV_ISA_EXT_ZCD 78 #define RISCV_ISA_EXT_ZCF 79 +#define RISCV_ISA_EXT_ZCMOP 80 #define RISCV_ISA_EXT_XLINUXENVCFG 127 diff --git a/arch/riscv/kernel/cpufeature.c b/arch/riscv/kernel/cpufeature.c index c74bdb9c0a9f..acd745bbf41f 100644 --- a/arch/riscv/kernel/cpufeature.c +++ b/arch/riscv/kernel/cpufeature.c @@ -315,6 +315,7 @@ const struct riscv_isa_ext_data riscv_isa_ext[] = { __RISCV_ISA_EXT_DATA_VALIDATE(zcb, RISCV_ISA_EXT_ZCB, riscv_ext_zca_depends), __RISCV_ISA_EXT_DATA_VALIDATE(zcd, RISCV_ISA_EXT_ZCD, riscv_ext_zcd_validate), __RISCV_ISA_EXT_DATA_VALIDATE(zcf, RISCV_ISA_EXT_ZCF, riscv_ext_zcf_validate), + __RISCV_ISA_EXT_DATA_VALIDATE(zcmop, RISCV_ISA_EXT_ZCMOP, riscv_ext_zca_depends), __RISCV_ISA_EXT_DATA(zba, RISCV_ISA_EXT_ZBA), __RISCV_ISA_EXT_DATA(zbb, RISCV_ISA_EXT_ZBB), __RISCV_ISA_EXT_DATA(zbc, RISCV_ISA_EXT_ZBC), -- 2.43.0