Received: by 2002:a05:6500:1b41:b0:1fb:d597:ff75 with SMTP id cz1csp103856lqb; Tue, 4 Jun 2024 06:28:36 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW3LZhTvVZHNq++/eFK7h87JymlWOnlgu3K6yFNTfxcqd0JuPwGjCQ1VESUSHcUpB5RbsRGozAciZpsqqPPcrJ7P7ZnC/JzZDqP7xYjpA== X-Google-Smtp-Source: AGHT+IGBRIIEsh+vcNdCHX2/98JJSgVQh7VMN7e/rS6W7A21v1MJbD/vDzbsDhiam32jVsTzj9p4 X-Received: by 2002:a05:6a21:32a4:b0:1ad:7cc5:ecee with SMTP id adf61e73a8af0-1b2a2b5fd8fmr4314531637.5.1717507715990; Tue, 04 Jun 2024 06:28:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717507715; cv=pass; d=google.com; s=arc-20160816; b=cFiX8qVTVEU+gnTLAr3ZzO1RSP2YgibaMPyxA+7B5AtjNH7fwF5awJJFYgnV9w4REN 6jaxCgMuCftVfUa13+l+Ok0/M4fC7KY7uSHR587lLUg7sAJmA1loIzj2JYZoabTPS0M3 4fE6K71F9ZVaLfyr0VtLmYqNv0EsZsQKZIr/GIXYM4fXpM0nxrQTqcz/+oyw016h+d9I nwsN6B3b984dkP3sRXAOCQWIndr3Q4bkvreSGAz9V2Rkn90DCfQ9lGBYPT0Cw2VUBq3r GmcfSHHy3mjQy/LKjdcHO61BEPwtDbzrCBbgmQvS/2uJG5/6PZtVjaI9VC6+aeuPMrxN natg== 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=+f8PvBYYePzU1WhfRZSwb8yDs46YibFa/aQ6ldPx3Ns=; fh=eJRqkUts2aFfpmvgIZpNvpGNmm6YneR+V4tOGuXvbJQ=; b=ZRRfd1HvQC3xjlHULtvE+CWH+PenaxZraJSek05D06Vx6mBabiaRhpBSfhRdydWqom qRGzogWo5BQRtrDiGdSXadO2TnyFNU0gfBHEMbrguxmOVQnT1ZbIckeh4fvVLxfKdMqx FYXzrUqCHgIEbRnLDNCWlQRka+zFtde1LoV8+tqNl6SFCLQMVaSwbrBuC0+DPo0m4JJE nYTN2zoLAgJgxfP9BsscM5x8kK+5W345wUCX1Ha0c/XFh1wOVdEziYCAfE7wrju1TAs0 Y6WCWH+LdaVS0nsTWcWSb6t6ycxS1kD9ku1a2L45Fxsz9ywT19WXPKpsaLyzxkvG+WMr 6rkQ==; 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=ShS4RtxD; 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-200642-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-200642-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-6c355157b95si8180144a12.190.2024.06.04.06.28.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 06:28:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-200642-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=ShS4RtxD; 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-200642-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-200642-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 18C98B28B50 for ; Tue, 4 Jun 2024 12:52:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0657E14830F; Tue, 4 Jun 2024 12:48:45 +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="ShS4RtxD" Received: from mail-pg1-f171.google.com (mail-pg1-f171.google.com [209.85.215.171]) (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 DDF331465AE for ; Tue, 4 Jun 2024 12:48:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717505324; cv=none; b=RecL7MTefddHdLqEF6xG2dm5klj/zcFWBw0BVCnzqliB3wXnRtQlUTizrUSwtZ2cdfk01UnK7rRJ+1xyUYZ7AbpidYbbvhqiVJEyJx4n8tVmZAr9SU5aXPusP5bJGyw2wdw2dJeTwrgrSdJMt+L9+NwZ5Hq2JSYdB1eX+kNmBwY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717505324; c=relaxed/simple; bh=HmUcZPgTX/UNRJEZ+VjOUic9enA404rzlV9xf8WcUrc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=CwT6VAhaE+lAMfeeBTwn0YHLCpVqHoHyLYlOi5fBisJYnwEtvH9zbajvZWVbOEZcW/qEd+9+Awytwg+SiVBe3EKWBcFNjIKQcBl2e5RGOP8wlmk4B1bByef2KtDdowSWn5YnOnt6o1Oq4Id7zek3818PbBHYkO/R3wJjsjlR+zE= 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=ShS4RtxD; arc=none smtp.client-ip=209.85.215.171 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-pg1-f171.google.com with SMTP id 41be03b00d2f7-6d125d826f4so202913a12.0 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=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=+f8PvBYYePzU1WhfRZSwb8yDs46YibFa/aQ6ldPx3Ns=; b=ShS4RtxDxkYMkGEgC2co5eQnZ9iyG40S2bBQldpuAkxIVKeui8YRuPYMlbHr8mszFj oDFItw0axwlPYqaTA/xY7f7FCrccRer9THksGtBLzM8akmbAkaBVDFNqz3K/hdXmnkcA BR4pZQILwuC0bQjvvy/2IjHCJkn6yKQjcfsCGkm0IvWcXaWlGBtid/R4Q6S+vu9uhyiq 5mCsJmkFR4lHPv+pBsuK04UHkA7Q+uL7XAqo2I5LEBaI724cmzq54QRI0CVKMiqMQt2S Y2esOtn8fBHd5+Y8H5JSdc5QRKP9JjG808ZXw8phVpDsiASpxJgjMyRMoWGBYWzL+07x lB9w== 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=mQmRAAxeidqIHDNWztAo2PyUzByMLq/P2Dpt5KQ00h2M7v7ftN3pBebbz5t/XywdDX FQzidjyBPIKvaZGV9yrgUVgWZD0bVE5PUjc4xhIwSFuiV4RpnNNaeSkTZtXxWd8Ix6jx flutvvbPgsK/aS+omQ51eFqBoL+wMfttC2v4M9tC+FEQ8oJaCxlLuVrNL+Ywh/yrJyjG 3ltCItcbt6N49gD9BhXaJZTuzYh3kCvJPBDc4Af/lr9+q8z3w/rvfIs7CNig07ZF+28T VnWuYI9WAyse08tuEKppeya8WzycdV8JWbtSDYpXJcZorRr5i80vPnWgfVqp87DPMiOO G3SQ== X-Forwarded-Encrypted: i=1; AJvYcCUr5lbYLYWv+uFcQdAiSTn/x2F+1Jy3geokGExQSC3Afzu04i4eqeoL6y+xOsL2DMU4gFedyCEYYIdO0hjpLX2Idn9RwpdKOnZVx3aI X-Gm-Message-State: AOJu0YyMzKo4r+E6Nz+1NZt5NzWf7+Lulv8Bok7kI/4/Z7ZLFgsmj0M3 gVPQ9653/0Y5FQbraWL/OtwR+KIHFG/A4CwfxRXfCcOYTenzRYM82kItvH48OJU= 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?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, 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> 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 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), -- 2.45.1