From patchwork Tue Jun 4 12:45:45 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: 13685252 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 73567C25B7E for ; Tue, 4 Jun 2024 12:48: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=6bVDsWBaeVJDqKhA4WTqd4jcdNBQvOVzzkgJxCkffl8=; b=q8nwULcR4eSH5i UJ0pg+KVsZs1D7Pl7YXXmjXekZmN9Jk+02iWHk72baGH3hJ5TyynFwAyC3A83Sc80uaH6CLyKO/pb 6+PFdaAgtfnC/lRqZhqdTItfh0/HMxa9at7y9HzaMa/mYiUHNV3nNpOJQg0Ej+xSfxXCWTNt3iV4E XShrs8+HE2fd/SQLv7msVDQD8XY6rEFd72o3MhMk7aQEignWseumevF6PSn3/DtgZCGvTwBYRLz/R EXOpf7KGxeus/OujdkjFMG5hH4aM0rf3bQyuQH2LcgKNGrZB5TnRYI66tWBVd2q/ir5Vil49e+hod 0lY7/9Io/eiADPi6mq1g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sETaq-00000002Mwf-3w8c; Tue, 04 Jun 2024 12:48:48 +0000 Received: from mail-pg1-x52c.google.com ([2607:f8b0:4864:20::52c]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sETam-00000002Mrh-1iZ6 for linux-riscv@lists.infradead.org; Tue, 04 Jun 2024 12:48:46 +0000 Received: by mail-pg1-x52c.google.com with SMTP id 41be03b00d2f7-6c9cd96e485so313895a12.3 for ; Tue, 04 Jun 2024 05:48:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1717505322; x=1718110122; 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=+f8PvBYYePzU1WhfRZSwb8yDs46YibFa/aQ6ldPx3Ns=; b=2dmS3eLP134vNtcAkpf20jkQ6BG/LXsZR8GXfnwpYqpWKBrukUXpJQ+Z+5eCThlrbZ Mq0zm+xbDu52RCHtCWTEJLEk6gUWYQOFLyxOEK2OkxW/gCVPAmd6PHobyGofO+Yus9iN lG2NZyLFExY+iU8BJLE9e2Zd/xYyX5/XpM8I+VVnYxhBuUYVB7hweCBjTpdwjwYQYsa0 tGoB6pAbN3ZH6SyxQ7utAmc8XSZ32ji5meNovP+sNTGxgmRA1pentqsURzmIDBLJMNiZ c5eCpuxykvO/3PRkFqMCbPS6VQ9nDMCsLeXhayc/YgjyUnWERnA2b9ATQCKUHmuVO+vX Unkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717505322; x=1718110122; 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=+f8PvBYYePzU1WhfRZSwb8yDs46YibFa/aQ6ldPx3Ns=; b=F6w6KS9ypbApZ6Gw+JVvTQ7VcPGckDzA6QkCILTG1moFRTA/e9uLaphBg1oEynSy4g 2gxu/FUmfpUY0C6u22HMUKYr3UF+sxBk5FWA5xz+wLlg009iqWYcxbdzGZMpGh3ciozJ ZMG7gz1STtPzHu+rnbeGp1f8Lnqy5YKBBHpYCJgCpkIIi0VS0oDtTLCpkYEDP2/F9Bho F2djrqpZDbkH7uT+JNSNYomOnaZntg4BWEfK2yQxxi8h8zlwmKp/qyoVVxtT3+fqkHpl 7S1vvqF1hUaMUJwmK5Z6V7l/OskF74Q9ZJEkjoS9IytOGSntAZP5XYJY/jbmvHsrcmfK H9fw== X-Forwarded-Encrypted: i=1; AJvYcCWxJEd45tr9Bzk7ePHq754uqEHo0H51RgMvg9B7/O4B0U7TOFEmRlDjyU0CuO5q0kYAxVjoAh3XheC5sTpU/Cp+7yOy3iO1YEJq40/SyDZZ X-Gm-Message-State: AOJu0Yzo86JztTnOKK74ZICZJEGC9k+JhEIW8h5e6A2sM/oMHORAKPG7 9kojh4LlGt/Qlg3v/Z1UhWrlYuS3TvFIKiVsRXJaFzByVaPPUC0s2Pd35Ld5T/M= X-Google-Smtp-Source: AGHT+IHlZckxUbCS2xW6q2DtBaj93CInAhGV+KC/Lja0MHjxnG9sUtL/5KteefRmvNyH0j8QM/rGkQ== X-Received: by 2002:a05:6a21:789b:b0:1aa:68c4:3271 with SMTP id adf61e73a8af0-1b2a46a884dmr2408655637.3.1717505322181; Tue, 04 Jun 2024 05:48:42 -0700 (PDT) Received: from carbon-x1.. ([2a01:e0a:999:a3a0:327b:5ba3:8154:37ed]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f6323ebc69sm83042885ad.211.2024.06.04.05.48.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 05:48:41 -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 v6 13/16] riscv: add ISA extension parsing for Zcmop Date: Tue, 4 Jun 2024 14:45:45 +0200 Message-ID: <20240604124550.3214710-14-cleger@rivosinc.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240604124550.3214710-1-cleger@rivosinc.com> References: <20240604124550.3214710-1-cleger@rivosinc.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240604_054844_607576_23C1F518 X-CRM114-Status: UNSURE ( 9.69 ) 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 3915c9cb088b..8606b164c696 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 #define RISCV_ISA_EXT_MAX 128 diff --git a/arch/riscv/kernel/cpufeature.c b/arch/riscv/kernel/cpufeature.c index 53c7ca590a22..ab2953245609 100644 --- a/arch/riscv/kernel/cpufeature.c +++ b/arch/riscv/kernel/cpufeature.c @@ -320,6 +320,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),