Received: by 2002:ab2:2441:0:b0:1f3:1f8c:d0c6 with SMTP id k1csp178790lqe; Thu, 4 Apr 2024 03:35:37 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUiaI+ctQ76fQNpMK7/AV+a2XnJELu7V3YsxZcN3Wpxx3PcNRrFKpMGZ9nLZ4pPGmG2XTjEmvYhqtENHwMG9GTilhScGE4Px9+8Eq/wfg== X-Google-Smtp-Source: AGHT+IFjHH4guxdrYFr6AEnPbkTRzZ/t8vZf4CKJaGTlHqn2ckjX+KFggMWHTmlYJSC1WJfZr7df X-Received: by 2002:a17:903:22ca:b0:1e2:36d:c67a with SMTP id y10-20020a17090322ca00b001e2036dc67amr2787956plg.34.1712226936780; Thu, 04 Apr 2024 03:35:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712226936; cv=pass; d=google.com; s=arc-20160816; b=SkDg5JRKfsIZmfhOKH4zEJ5XkQZCuPRQDh2uVoD3nH5CP9GfulX1yLjVFKHqwm30mo OK1Zc5BiEhvODj5ucwW/97io8Zsple2hnfQyjPilJSYod+DQ4qWSiaHPemEnyOuy2bwD 2ht/hSGjZTJuIO4b9KWQpW2gUbkUsJfNcz7d1e/ssmLyTZUIPkneeaHzK9Y9+XdVQaZw xbCTDNmgL8JKt/Hd3HhwUmzceCfVrTdPllgHsGOBOG3eOCdfvLzhTHIjwvmakALm6u4a ltE7ze6ZF253lUSINYhTP/TLIZtJOewyED8lWdom0RKTgvljhVpHs/Z/QqEuR6tVVpHZ 44cA== 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=hjF6QSE2cP2K1a6PPhsxX1XHwBciK6+3OaYc7SlX0j8=; fh=zLDuzF/XL6FjDCCusw3/nN5lycm6B4WSDBDmhVVrBGE=; b=Hel/1aN+00L1BczeOseSCLtty77bihqt0rh0yTCFkRtN1HQNonNpQAKVmLUdZduXRi qve8cR1QPSz02wHUZo2wgqjoj3GCJl8ljSkhg9DQWw3uYtXrzHYcMeqljVR08V8OQV49 sPbyYGFSfLejbtsQ6gjJqvXzvvndC2uyMCce3XPHqsnUCt/QuZ3blGA+omqvXYKXonS6 AZxPd3Qs4HKJ5XtkDlHqR1c1VkshWXNIoGH/JEy2s6jXoBskpSR5zl2esUMvbtcvxezI 2zkej1huExq+DSK6ys9sgyCK5UzHRj+z8w8boC2obHsRFX6yOqTJ/sO6HYdXuN3SYsk9 u9fQ==; 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=vnxzuEo0; 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-131244-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131244-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id q4-20020a17090311c400b001d717e60007si15208302plh.397.2024.04.04.03.35.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 03:35:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-131244-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=vnxzuEo0; 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-131244-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131244-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 3601328427C for ; Thu, 4 Apr 2024 10:35:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 63FC580C1F; Thu, 4 Apr 2024 10:34:31 +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="vnxzuEo0" Received: from mail-lj1-f181.google.com (mail-lj1-f181.google.com [209.85.208.181]) (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 01AE078B63 for ; Thu, 4 Apr 2024 10:34:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.181 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712226870; cv=none; b=jMUgBnxq9wB5XO+h3i6bDZ9jKyr80qnuo7QySBzzeBr4M6zd+TO7gbTh4xjkOYOxOdB5wurzoSjgIq7DBjQMP7WM+fzzymnTMiz86oCZh4Pp36w8NaTy8wChulEHz7gTtv8zUM/XqJGdyPdxin1zMCbZi/9WruPMhkabAyF9Cmo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712226870; c=relaxed/simple; bh=lZP1OhIthNyfKGBgLui9SHH/SaxE/ebthIO1/OB0+2g=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=cqPFzQ4niZu3mcUm8bDNaHPPbprRZuAIvwt6eLYDEkm6HTH3PU6i5J7KGZYcmCyEfkXSbTHWkrEowY6PeO4nc7s5QgcebFpl2Mir7Z6FZ4sSsZDB0KGRn6oKMSH9vIt/DpyfMrunXjwfuEg4HFsaIsMG7NniKrldRKjyb1Jm3aE= 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=vnxzuEo0; arc=none smtp.client-ip=209.85.208.181 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-f181.google.com with SMTP id 38308e7fff4ca-2d8270e89d0so1030591fa.0 for ; Thu, 04 Apr 2024 03:34:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1712226866; x=1712831666; 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=hjF6QSE2cP2K1a6PPhsxX1XHwBciK6+3OaYc7SlX0j8=; b=vnxzuEo0ey/KkzSv27sz7xst0hPkHMpBc1iESnrydRMlghdfKUsFD09zcfrSKCN+/u 1IOgoWVFPKAW2n14yTAow2JPZLXb1gSuM2Sf+PEn3qbHLqxpE5QcB6WxyqEJOdw7PoHv QiXE2TyGNTUDkaNZme4pESBL7JEI5t6+WaefHN2LzS8LmM201JfbDlVHT4jZAmt7vstN dnsweONljZg6eJHVx2KkNgNZFtn7pzUwq8k6WtEy104cTGNk9F0Hq839GaE6cGYxhff2 Z/DFV6XrEa6us9a9T2qnH9N45jlCueekTWT7O9m6TlBjlUm3orCeDHxloCwvKSJPYMAe Xcsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712226866; x=1712831666; 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=hjF6QSE2cP2K1a6PPhsxX1XHwBciK6+3OaYc7SlX0j8=; b=K074uKwzJe0t3bEQSXMMRxcCAW+NLUjKv7BPmoQ3ZnqokC0e82sbppWHoetT0a2tlX vOYBWKSRaBHXiPaQIyiaXaXGr/umcxrb4Na2bQvJG3AJXFBfN3gM53d4P2gq5uEZKcJ5 8RxRaHerPHnkgzFP24NnUQWw2Ga2HnGOVpH73iiC8C31MQZPl7HrZm4rztQJRIDkMCEq VQJ7VHqZLVlHJCDaxgTWQVYy2fGhtpAjUZGRu/6sJW2VdCmZACBfXQGZGi1VMVWFBcQO DwMaVz0vjzGgvVpU9+dSOj6NLMbUgGoMDIqHK/TT2GYPVAkjxJI8aIJ+lKwvkHOWyuJ/ M4HA== X-Forwarded-Encrypted: i=1; AJvYcCW/qTwV8wwlh907BVHqcWonALEW8YsyJbSFm93pntYwVPjFJYiWAGCiRisI/RPfunC5p2YTy8ixusXh8RtCvEQGU4VuqwCW4YID5H8G X-Gm-Message-State: AOJu0Yz9+oztOl5gjr3kM5gsKxP0iz72nwbrbjStWJzxHM9AOzCSKTTJ xrB1jPtdvJgTraAlHWbIP90y5NA9p4dAzHwufC17kXcXrUQ5Grp4FNsGJeZIJqs= X-Received: by 2002:a2e:b0f2:0:b0:2d6:fa0c:77b0 with SMTP id h18-20020a2eb0f2000000b002d6fa0c77b0mr1408426ljl.2.1712226866293; Thu, 04 Apr 2024 03:34:26 -0700 (PDT) Received: from carbon-x1.. ([2a01:e0a:999:a3a0:555b:1d2e:132d:dd32]) by smtp.gmail.com with ESMTPSA id ju8-20020a05600c56c800b00416253a0dbdsm2171340wmb.36.2024.04.04.03.34.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 03:34:25 -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 3/5] riscv: hwprobe: export Zimop ISA extension Date: Thu, 4 Apr 2024 12:32:49 +0200 Message-ID: <20240404103254.1752834-4-cleger@rivosinc.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240404103254.1752834-1-cleger@rivosinc.com> References: <20240404103254.1752834-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 Zimop 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 b2bcc9eed9aa..9ca5b093b6d5 100644 --- a/Documentation/arch/riscv/hwprobe.rst +++ b/Documentation/arch/riscv/hwprobe.rst @@ -188,6 +188,10 @@ The following keys are defined: manual starting from commit 95cf1f9 ("Add changes requested by Ved during signoff") + * :c:macro:`RISCV_HWPROBE_EXT_ZIMOP`: The Zimop May-Be-Operations extension is + supported as defined in the RISC-V ISA manual starting from commit + 58220614a5f ("Zimop 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 9f2a8e3ff204..ac6874ab743a 100644 --- a/arch/riscv/include/uapi/asm/hwprobe.h +++ b/arch/riscv/include/uapi/asm/hwprobe.h @@ -59,6 +59,7 @@ struct riscv_hwprobe { #define RISCV_HWPROBE_EXT_ZTSO (1ULL << 33) #define RISCV_HWPROBE_EXT_ZACAS (1ULL << 34) #define RISCV_HWPROBE_EXT_ZICOND (1ULL << 35) +#define RISCV_HWPROBE_EXT_ZIMOP (1ULL << 36) #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 8cae41a502dd..c99a4cf231c5 100644 --- a/arch/riscv/kernel/sys_hwprobe.c +++ b/arch/riscv/kernel/sys_hwprobe.c @@ -111,6 +111,7 @@ static void hwprobe_isa_ext0(struct riscv_hwprobe *pair, EXT_KEY(ZTSO); EXT_KEY(ZACAS); EXT_KEY(ZICOND); + EXT_KEY(ZIMOP); if (has_vector()) { EXT_KEY(ZVBB); -- 2.43.0