Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp1017750lqo; Fri, 17 May 2024 08:21:06 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUEOAPq0mS4h3KeE9CDZTyupv3cXLxpqYz0UEOPmtk9oSYz+5Gzp9pAKcb7+LJeakJRXwLpCr8ecnnUXy4KVADs8emHqZuK7vc1puquFw== X-Google-Smtp-Source: AGHT+IEZlXUXlB6UlKuAkBuzECe6OrhXgyN5IPhWu14XIRDKocDRYPGq+mWiybWMhO64YTL+USvE X-Received: by 2002:a05:6300:8002:b0:1af:62a6:e2 with SMTP id adf61e73a8af0-1afde1fb753mr21100139637.56.1715959266093; Fri, 17 May 2024 08:21:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715959266; cv=pass; d=google.com; s=arc-20160816; b=uERGGWhZSXWOxgZdVRvAQy7WyGde7lhbOkIJ2eMgFfp+PlrHtKgXJmARpMte+fBDlG ZBCWK9/UpsSlTW+ZIPKup/HzZWP7ONbII7ZUU1iEml9ilP6Oheb+jEjSXps+1s4mzFmH 1gbi5WQUOdD4BINA5oRwLK9aZce2SbNpeBvwUttntWxn3mQ7zRGAv3pgFz/llcEQUN5q gSzmExzN7E9NEpNE9LEvh2wmto/1h9wNEU8mKc2OHPEt9uXxYFl48+YXPsVnAHRs+Fez SPFBdx8vbDOtvX1icsUZDYw/pa48uvidHWb/DeH33zU4EZRPeS/fEToCBYf3HgKpkwfz HGFw== 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=aKs6nP2IvbAkKOrGa5+RoTJoO1OEnrEjZ7TnjWCI1Y4=; fh=vsI3d5TGNb5DAMxxCzV5IkFZJXGUaCzJx5uZmNd6Xfo=; b=rk/+QAKz8TYUeXv/r8kc7J6ARloBpTK8+zTHS8prBw2EoqIVKKRWkJbCnfgdsYqVNG JH6MY7Mw2rlFR/wN2huJvSJMLGc1l3j2NLN0T3tzbEMFUzoPuWst/kmsMs2G1p3BlNbc 1R4W5f8zBC0Dyh/SsmPqWVSUaH29QKZAFfR6Bt6fOWyr0TwPryQRMAzYIWTiVa7ZbL/W FydO0hH4TVyi5zqoLVdx48Rg9qrCUERrr2w4YWuX7ECESO63XaxlS0Ip7Ronj5Tgh3sf BUKz78d0ySu5QompS9zKS7lcy8CM5ebHMbazZ2qE9UaFt3+LIfp/EDXwviU14ozs/9oL 7Vig==; 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=ttKD+rn9; 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-182253-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-182253-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-6341180e35bsi18422353a12.549.2024.05.17.08.21.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 May 2024 08:21:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-182253-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=ttKD+rn9; 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-182253-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-182253-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 94112B28602 for ; Fri, 17 May 2024 14:58:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C300380C04; Fri, 17 May 2024 14:53:37 +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="ttKD+rn9" 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 DD89D7E0F6 for ; Fri, 17 May 2024 14:53:34 +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=1715957616; cv=none; b=EzHBriZcd6+QUpL4cjQpxLd7E1gCKiiNPrArufCntH1miaxJgEmhjMHnwVEWyO3TUwQKZnjXBf0c+2rZzMg/VUkKcwSYCEGF5rTWxe6zVbuBmnzuSIbK8Zp9OrSBRchkjjp2mJk7da3O8xMBvDRUjGZkEzrHp9FRGxKZPagrN3U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715957616; c=relaxed/simple; bh=Lg02bseGYv3ysTywI8RCrbB6LMHH6lsEnS8ExUzwERk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=nYZOP47fG7upD2pCvGEU1zuQvlvRMuj0pTGy/AagXbGU0JIdCjlPs851bnfECjm/mboy5xP6zns0wpfQEn3ies7w/QfptyWwvGbV2dNsZkwSuy/ZAePomlQvH4/iypPtNVuE50ZEXpAJtHl93NvU9uGhmF96SYCXaPdJHJx6iNQ= 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=ttKD+rn9; 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-2e70f6b22e2so751241fa.1 for ; Fri, 17 May 2024 07:53:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1715957613; x=1716562413; 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=aKs6nP2IvbAkKOrGa5+RoTJoO1OEnrEjZ7TnjWCI1Y4=; b=ttKD+rn9FF4+d31akcjlwv+JbLV8AAMzllKvOmTcoeiSzX/oDdlkXzmhEzyL2ZVigG /qnplPMARAC4cOgY2h9wBjWsp/pWuB6ODLqmAV2uyxlMz/c3UFS4Byx6sX0vWr/gylTQ ujbzTAqYih6fJsse63eDPabVWqvHrlp1NVFns5t6kmGaL4+geME/PsXmpqXxBC3t1KqN DuufVvcFkfpfzptIWbvE7LXlTX53p3CcW5AD+QRFmB/LqcD030Ch9eTJLbp+IZftgHQV n8cXvJcfdHZfl91/WtcnTGDK2m6il5P6Di7StK+PrpzfRQqKmcPvWCFPOlgojIC61pLG P0Vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715957613; x=1716562413; 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=aKs6nP2IvbAkKOrGa5+RoTJoO1OEnrEjZ7TnjWCI1Y4=; b=Hjoz4LsqOh1ySfjtPbjUHgygiGhh9A+6fUBVLq6GjNBjOo9jaq7M/6OzEEkwVdSOPM AAHwaxtDZhqL9kvkZClVBTlCZLjVty3kU2CTiYrMmVCo0nKVZ7RHCyDp49D8t+u3ZHeU wiURe9/08XlpSMWHSiu4GJqhATKwQj59yeBHEAilAoKO+AzpH3+FuTaprKKmyux2i+XJ lJGZmpjUV3VN39fCBdsVT9j2JI5LucX4nRmmpDWn9V602YPfMFim2lGZUArZGdBHoji3 jCYdwZMGiH8SL9QE9/teHuFl2R/AViqqLGVfzlObJ30/7LwEpqto1Ca/RkpjtH5jewQS wwAQ== X-Forwarded-Encrypted: i=1; AJvYcCW7sZCA+BkZx8FHQPbogb9dAs+YNEUMO4H8sekk+2a8XCN6jPtSPbDLXshU1KRAwBJeMCitdFiphqENHmXbSBeloj5z1fStzeGgz+sS X-Gm-Message-State: AOJu0YzKJk/w0AAAe4OJlaaEMjsPVe0z9iDNWrejPCjm2pF1YjOmUxDW NCaIfJREyYnvPPGP5dMH/tPZRKGZde9Nwnatw2cm4s8s/lb84AEPURr3HygkPoU= X-Received: by 2002:a2e:a4d9:0:b0:2e7:14a4:1f75 with SMTP id 38308e7fff4ca-2e714a42f3dmr2240021fa.3.1715957612950; Fri, 17 May 2024 07:53:32 -0700 (PDT) Received: from carbon-x1.. ([2a01:e0a:999:a3a0:46f0:3724:aa77:c1f8]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-41fccce9431sm301723695e9.28.2024.05.17.07.53.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 May 2024 07:53:32 -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 v5 13/16] riscv: add ISA extension parsing for Zcmop Date: Fri, 17 May 2024 16:52:53 +0200 Message-ID: <20240517145302.971019-14-cleger@rivosinc.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240517145302.971019-1-cleger@rivosinc.com> References: <20240517145302.971019-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 a5836fa6b998..aaaf23f204ac 100644 --- a/arch/riscv/include/asm/hwcap.h +++ b/arch/riscv/include/asm/hwcap.h @@ -85,6 +85,7 @@ #define RISCV_ISA_EXT_ZCB 76 #define RISCV_ISA_EXT_ZCD 77 #define RISCV_ISA_EXT_ZCF 78 +#define RISCV_ISA_EXT_ZCMOP 79 #define RISCV_ISA_EXT_XLINUXENVCFG 127 diff --git a/arch/riscv/kernel/cpufeature.c b/arch/riscv/kernel/cpufeature.c index 3bb2ef52a38b..0a40fa1faa04 100644 --- a/arch/riscv/kernel/cpufeature.c +++ b/arch/riscv/kernel/cpufeature.c @@ -290,6 +290,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