Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp1000895lqo; Fri, 17 May 2024 07:59:05 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVowhvaXpKMNJoQTNUXgaa5oYtlVBhjFLVHkycNGHcWge6UHi+8e5vdGRzdRAWh5x1tg1aE6Bu2d78vcOG/wwQzGRM+bbsfd3pHT+O17A== X-Google-Smtp-Source: AGHT+IFssCS7phFWyIl0HYhC/MR5ycR4CYZZgb655TqYhO8Gt/v9MRfNl+HVDeP4SY9aDGDDC857 X-Received: by 2002:a05:6870:c0c8:b0:22d:fc00:9580 with SMTP id 586e51a60fabf-24172a72f2dmr23848997fac.16.1715957944817; Fri, 17 May 2024 07:59:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715957944; cv=pass; d=google.com; s=arc-20160816; b=A7/4VpbyE4Rcs+tm+IcuhtZ8amrlX1ft2qYCm+H9EzpaVQXbPhyXfKsTg/k9wYhw+w SNQcxRM/mlCAjzbRd/He0T2za0OCzr+hWkiaMIjvMXl6q3Sw67ecpwPg8l8eqlBTcFJx 4v7OoXZ8VxJfeG+yiwZshsGzOf3nTZqFltACcSTRiS9Tj0qelFxg/9Dku7M6xyxOPmS0 W55Q20SLepbQUzRrbRcvyHWFwxa0hCpV7D7+6g8Q1p6RffeA3HbR/SXc6Man/6dobdya V8r+yefrj0/3gETstVAgoVYJGieu9qQRGnoESQq1mC5yWdx19NMPDDhHU3JmXwGYWxma AFsw== 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=Y+iPbn/khpTsPchyu8Yai3JeJ+A6vpdXRb3hYqL1yvk=; fh=BBN+Qvn64ixYcghacSf84oQS+Ox/ho/FZhH0W8H36x8=; b=ip8HSNBTifuv6dOziSiX0/YAcZjgM8Mh/GtPmmCMTYcC2TrMGIDJlLohXXLaDa6NDj qvUyAwXv/BpQATTEE2lJteayjQrphax9ZmPoc1VvQtTJd9xceTiemuGWb0E/uM0HeB+1 2scZMw2aMcKZZaMRYkTAZ8Booz0ylnkitXtMUUyk5NlutydK8EleVC5XKAc4HSte16XQ r4CDRyasvZarLseLrmca44JMhTrKPBi93R62wPTfg8hdU7H7KG2TmzGW7u8GzhAoR8d6 BjEAmhGusA9sTE9Ezu8Q3tKURMg0cz4zQv+dJCb7R5ZkfWcv/PCtc8ydRzgGGy9qWm51 iiCQ==; 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="OUJ3/FCE"; 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-182254-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-182254-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d75a77b69052e-43e024b0348si165193241cf.448.2024.05.17.07.59.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 May 2024 07:59:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-182254-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b="OUJ3/FCE"; 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-182254-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-182254-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id BBF7A1C22218 for ; Fri, 17 May 2024 14:58:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 129C28175E; Fri, 17 May 2024 14:53:39 +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="OUJ3/FCE" Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) (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 479747F490 for ; Fri, 17 May 2024 14:53:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715957618; cv=none; b=t5xhDAslaFc2kyHTasgeohbdRW5u1HsNy5acksAHRc9rFeEdo/Ts3vua9mIPeZhOrZupcvtSZTen+UgItAWObExt116hhevulOPvYf841nq3bgtMAOyqTn/9ltkyXlNrdTuLCHNdpS2KR0Y3s/5iSTrUy5Q6+Am3SOE0vncUEKo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715957618; c=relaxed/simple; bh=0WBeALV8geya3GDdnP358JVQaqgpRdm1HDA59jh5fhM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=e0/6iTZodYICeZyNr/S1LQH9oxWCEqxEqrPVDgv+XaPae/394g9cNxeDMhm3NGw3Wij2r4r4trnA1J9ua5l1cC4aRxfs9sbAwkEQMQ1gLf+bdmYWo73ZvqJGepn30xjJ+gVmcM91Ty9BmLngM/1a6Qj8d6RcmMoSfQ9fNmC5X+k= 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=OUJ3/FCE; arc=none smtp.client-ip=209.85.128.43 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-wm1-f43.google.com with SMTP id 5b1f17b1804b1-41ff95798d4so318345e9.2 for ; Fri, 17 May 2024 07:53:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1715957614; x=1716562414; 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=Y+iPbn/khpTsPchyu8Yai3JeJ+A6vpdXRb3hYqL1yvk=; b=OUJ3/FCEXEOaTHziPVWPnwuQY9pNqXmwSBrUbt5otAS9YGjoKKMrYAC2s09pNsNYn6 a0txpVQdV1ZDwI88NwuFnxoHSAcKCICPdILwm/objKTd9+8M/IaJAwSEv3Tq1Ttr/cph I1lN6XSOWtQoIlDbFIkYW0lSUvMQy9orsHqaJHmHo2gTubgw40pI6y0Bd61Fq5ujGFHh 8pM5ZCrqIw9kkdCcrRMidYaWJehEeoZHx41jD8EwAgIkIsuyv8jJ8U8zlhabds+Gj7Uk nymQrtDSvMtASd/C/KOHjIyvrXCX+Ifc2CofHd3Lbm+bAmWkZYcvE/N6NnFDCqSpZ9BO 6l+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715957614; x=1716562414; 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=Y+iPbn/khpTsPchyu8Yai3JeJ+A6vpdXRb3hYqL1yvk=; b=wG1D60w5wPkjDRpGdtpjQiEnRiQSdEMyyI/kfrTbuzDnwF1YsJZwgDvR9mFjaZb+kW WEfNXfgoCCktyzXuIMtTMgnJ5UhHq14k0MCK6e44IpQDyY6Q2kfqjNHOyzDgXvxoKwAy XMUxyyMWezMtlU4SS4rtFUA1B7p0gDwY7rOJsrPAp8yBbIy/y9uxMAsOnfswMzzS8FlD 2UNZXLxZdNeyAnHfYTgoQTu+ZrXkUX9BhAXFfXeMtcqm+U0q1VVWUnCVXAqaq+CM6xGk y6PmnzGKFhnuZQGKvffw9YW5UOtWvkJ13jo9Ixalspp4mGtYfitT5n3hsAkioXt1msLi LmBw== X-Forwarded-Encrypted: i=1; AJvYcCWbSRoubdNDUreA492/LRnGdnxKRGltfuqbB0upw6U7r1VBL0Vfx9Mz9ndE14/mRSHFvhuQsbAyJeKs9hWUzg7KWLdQI4Oy2o3EXBoo X-Gm-Message-State: AOJu0YyoFYPvdLsD6PavsSHHu9a2HVKDx8g42toOUvx3tsWCoVOvRKlP QeilZwuI4z979/9mVDKAyp2RH9U14GinfKf3o3pvOxYzKlivgwELQSUcOsNdHfI= X-Received: by 2002:a05:600c:3b0a:b0:419:f0a8:9801 with SMTP id 5b1f17b1804b1-41fea539b4cmr186010615e9.0.1715957614634; Fri, 17 May 2024 07:53:34 -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.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 May 2024 07:53:33 -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 14/16] riscv: hwprobe: export Zcmop ISA extension Date: Fri, 17 May 2024 16:52:54 +0200 Message-ID: <20240517145302.971019-15-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 Export Zcmop ISA extension through hwprobe. Signed-off-by: Clément Léger --- Documentation/arch/riscv/hwprobe.rst | 4 ++++ arch/riscv/include/uapi/asm/hwprobe.h | 1 + arch/riscv/kernel/sys_hwprobe.c | 1 + 3 files changed, 6 insertions(+) diff --git a/Documentation/arch/riscv/hwprobe.rst b/Documentation/arch/riscv/hwprobe.rst index cad84f51412d..9a77b7d14539 100644 --- a/Documentation/arch/riscv/hwprobe.rst +++ b/Documentation/arch/riscv/hwprobe.rst @@ -216,6 +216,10 @@ The following keys are defined: ("Zcf doesn't exist on RV64 as it contains no instructions") of riscv-code-size-reduction. + * :c:macro:`RISCV_HWPROBE_EXT_ZCMOP`: The Zcmop May-Be-Operations extension is + supported as defined in the RISC-V ISA manual starting from commit + c732a4f39a4 ("Zcmop is ratified/1.0"). + * :c:macro:`RISCV_HWPROBE_KEY_CPUPERF_0`: A bitmask that contains performance information about the selected set of processors. diff --git a/arch/riscv/include/uapi/asm/hwprobe.h b/arch/riscv/include/uapi/asm/hwprobe.h index 652b2373729f..3a3d6a2b4f48 100644 --- a/arch/riscv/include/uapi/asm/hwprobe.h +++ b/arch/riscv/include/uapi/asm/hwprobe.h @@ -65,6 +65,7 @@ struct riscv_hwprobe { #define RISCV_HWPROBE_EXT_ZCB (1ULL << 39) #define RISCV_HWPROBE_EXT_ZCD (1ULL << 40) #define RISCV_HWPROBE_EXT_ZCF (1ULL << 41) +#define RISCV_HWPROBE_EXT_ZCMOP (1ULL << 42) #define RISCV_HWPROBE_KEY_CPUPERF_0 5 #define RISCV_HWPROBE_MISALIGNED_UNKNOWN (0 << 0) #define RISCV_HWPROBE_MISALIGNED_EMULATED (1 << 0) diff --git a/arch/riscv/kernel/sys_hwprobe.c b/arch/riscv/kernel/sys_hwprobe.c index 11def345a42d..34c95eaf8cd1 100644 --- a/arch/riscv/kernel/sys_hwprobe.c +++ b/arch/riscv/kernel/sys_hwprobe.c @@ -115,6 +115,7 @@ static void hwprobe_isa_ext0(struct riscv_hwprobe *pair, EXT_KEY(ZIMOP); EXT_KEY(ZCA); EXT_KEY(ZCB); + EXT_KEY(ZCMOP); if (has_vector()) { EXT_KEY(ZVBB); -- 2.43.0