From patchwork Wed Jun 19 11:35:23 2024 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: 13703737 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 C00BCC2BA15 for ; Wed, 19 Jun 2024 11:36:56 +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=NxnTq9QYbW68rXv0l+ILbdEOukZn+aFW5QMo+jtz0s4=; b=ye33L67ATZ98Dn vQp6fGRYew07S7G5g7V7m1B1jMGumJLeGvj5MoEcvUGKTk/+KXBn0mptwOWA1stPgvhmuPco/F05L KJDagote9qu2BjwGYWFyN8BWgYlMUugFIMU0m3qcd/EU83fnV0e9iT5xz7Z+gPBCDdaXyDteF/OKI k4S5ynBF1EFS5bjuuJryV7WCg246bpDFEZCHRU/Y+6QJ56NEl6P8ViazPH9JG0K6RX7fRG/WzWyoV Cpz/0y/ht63TKRxePxGrY6PdjXVABSOkebKt2M96Mkac0ibiz2LP5RTXthLI2YhCwS9XBIJ4MYWFC Xu9tynvC9lhg8XzUCFAA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sJtcR-000000010fr-0Wqr; Wed, 19 Jun 2024 11:36:51 +0000 Received: from mail-wr1-f41.google.com ([209.85.221.41]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sJtba-00000000zsx-2eBR for linux-riscv@lists.infradead.org; Wed, 19 Jun 2024 11:36:03 +0000 Received: by mail-wr1-f41.google.com with SMTP id ffacd0b85a97d-35f0d49a9ebso404614f8f.1 for ; Wed, 19 Jun 2024 04:35:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1718796956; x=1719401756; 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=hSqXY8NQ+r1tvQyzaHIZAo9j3jx7qiAIRPgNfgAmyNo=; b=OG8ajUhS2ASqKvvT+ps2tPNbWRba6FLwelbmVJ/rY6o0ut4b5Ruvm8at+yN2LfqT10 K4Yi614jonJCf4H8/MtsdpUoqSjF9Q41Px1PJh4pA/0xKYuJTgJ4C8R4MzuB19UhhkIU OHHjFcFgvKmMFIRefavl4V0DR2XfwuaJA48e8sNSL/ybOne8eygE8EEI0W51mYPC3Qst IJg9wXmhtlSC9OJCrE+STy8jwHwBLnGvNXsS2A9uSaEV2sOAKZwdoBzWiAbLTqetk6Wr u4gk1FW0kko9GgUht0RdQOFvXeLHv4cj7vu/8CDebljdlwo4Cj8xNAC/EKtFFsMw7GkM V3lg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718796956; x=1719401756; 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=hSqXY8NQ+r1tvQyzaHIZAo9j3jx7qiAIRPgNfgAmyNo=; b=VNTO/3uCA6O63lUltB+GWBkHRocjaGgqKV0w433ypVcvveJ/oZvFRqGDxqPMlAHvsM jaZwrkWmTT3Ay4K953nQzMbaQDeZVFvwVgnXB56+wJ6yi2Rv4cD5p5pqvCXxOVIRisMW Liiho6WUhYggVFmNkCnaJ21tKaBsgLq9yrCHPBtT+/h6OZVZ8WJtJc6aQaF+CSCvaUH9 8H9marD7yz+ry40EfldZ4vNcsrAvwUQ/JqNpuI2ZbcwYqgFHiCQKF6eFdUyI5HxjFPOM 6Y3awGmA+YuaEGlDhH1YueXjv49FnzaS+HRybNYa5cQDSK6P6QYGs7zMRZPdoYZgJmG4 sucA== X-Forwarded-Encrypted: i=1; AJvYcCUh0Uqgm08fdo8amlU/M8hdZOu4Od/KFdZ2HSVLnCjn/XOFh3KKpvbmVRu392ZjXClGlC5RQC+eGTpD7hpHj+VzScUoC22vWNDEMJnDx/wz X-Gm-Message-State: AOJu0YxQSmipeU8jnAFql7jTaDRXO9PhanuB50Le3Aj/oTvAJuoNool/ 9CDhKM2TBLYBX1brZePVEpeCzdc7DBiuSW/EGtMywzHlb8ADQ1pUnw11iS131S0= X-Google-Smtp-Source: AGHT+IFlfP3NiyvXQKFOTNdljGuXnZt3spfJFUH69VuncHuc4xx9gjHsoS5MasjNknxMee/w3CiUxQ== X-Received: by 2002:a05:600c:4fc9:b0:421:bb51:d630 with SMTP id 5b1f17b1804b1-424752981b8mr15706485e9.2.1718796955960; Wed, 19 Jun 2024 04:35:55 -0700 (PDT) Received: from carbon-x1.. ([2a01:e0a:999:a3a0:e67b:7ea9:5658:701a]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-422870e9681sm266192075e9.28.2024.06.19.04.35.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jun 2024 04:35:54 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= To: Jonathan Corbet , Paul Walmsley , Palmer Dabbelt , Albert Ou , Conor Dooley , Rob Herring , Krzysztof Kozlowski , Anup Patel , Shuah Khan Cc: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= , 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, Conor Dooley , Charlie Jenkins Subject: [PATCH v7 13/16] riscv: add ISA extension parsing for Zcmop Date: Wed, 19 Jun 2024 13:35:23 +0200 Message-ID: <20240619113529.676940-14-cleger@rivosinc.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240619113529.676940-1-cleger@rivosinc.com> References: <20240619113529.676940-1-cleger@rivosinc.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240619_043559_264176_B78B5A55 X-CRM114-Status: UNSURE ( 9.59 ) 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 Zcmop ISA extension which was ratified in commit c732a4f39a4c ("Zcmop is ratified/1.0") of the riscv-isa-manual. Signed-off-by: Clément Léger Reviewed-by: Conor Dooley Reviewed-by: Charlie Jenkins --- 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 b12ae3f2141c..4880324a1b29 100644 --- a/arch/riscv/include/asm/hwcap.h +++ b/arch/riscv/include/asm/hwcap.h @@ -91,6 +91,7 @@ #define RISCV_ISA_EXT_ZCB 82 #define RISCV_ISA_EXT_ZCD 83 #define RISCV_ISA_EXT_ZCF 84 +#define RISCV_ISA_EXT_ZCMOP 85 #define RISCV_ISA_EXT_XLINUXENVCFG 127 diff --git a/arch/riscv/kernel/cpufeature.c b/arch/riscv/kernel/cpufeature.c index aa631fe49b7c..ec4bff7a827c 100644 --- a/arch/riscv/kernel/cpufeature.c +++ b/arch/riscv/kernel/cpufeature.c @@ -354,6 +354,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),