Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp1003734lqo; Fri, 17 May 2024 08:02:31 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW3El+sjUkF+u++8lnLSe5db0wo25LtvJwu+rLQxGGKo+qGH8ckzslKLoK0uEDQrLkeur91rNhoDSY24vYFpHXkqBPMQf/X7vOLIfdEUg== X-Google-Smtp-Source: AGHT+IEaXC/TH8OALXjBWkQOTqr1IQvyFtgA0+ehc53ZhyUQNIzW10Cpizzkc6i9ndglUr8mklm0 X-Received: by 2002:a05:6402:3185:b0:573:55ca:8f15 with SMTP id 4fb4d7f45d1cf-57355ca8f51mr14073368a12.39.1715958151233; Fri, 17 May 2024 08:02:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715958151; cv=pass; d=google.com; s=arc-20160816; b=XSA3mkEc2UjDg+SdPHvtOIgw2Gv7DwBxqxQD48ZKTiFVjivaTtuhrFovoUS0Zn+EBC ea1e3WQ8cN6ABvOAEt9YuJVdfOSOspB7Qpnh63L0PKy7d0MUWH9qWyXx34ynksyySNIN UNr8abvwI4jXhQTR15I8Nw21YsdshoHFv+yApJGboLge8wpFzNBSsm6yFmJSDS2kJBpi lEMNfK5mQerc4cN8e92Tk6OccIpSiAxyozq49Q6xdKT0qqhoGUpzkuufMNje7DI8TQ2y MMuqWTGY1lBMVHcEIvcOqv+PfBvvPY6sA9CVgd711eqIlTm55C5Yhl7Au04FzDb5bSPR usmA== 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=mlgURxZu8fG6RfbwOGV4+VYUtdkFAEEBFMEpVJI3jww=; fh=nD3A0H/35jew68Hgr7GjzBnx2yLZUvuKcGmp+SdyaIQ=; b=IAU6xVfJsBgOSD9SV0Kx8S+qwWhliQo2cog9ZnO+gANzg1TXsyUo77gO/vlswX6GqE yJtuWiqtJrMMDiB1H/aFciFGgHzJWVxrOofjpLVitXM75UvRlggISxDmTYvpRA2pZHHs fzJQzESUo6vOUHH8b2gH3qKcl/FJvwfd6YRKY4giv/FzCj/UE4GGRCDEnaBxU1mPBNZ2 mqR/GkPQV4roIRUf+P/vwHJgbTTPx3agg3hpy/AUUjPWwwWWiscpEU+UGH5DsELT1Ps6 n1w02F6r6+4nI11r+m0WQewStKiVqdkpvtIHe1R4DTnt9v9oWBqAHg/U5Qfvlw3L8WwP r3Ow==; 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=NPTy3bM6; 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-182241-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-182241-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-5733c2d542asi9923943a12.326.2024.05.17.08.02.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 May 2024 08:02:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-182241-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=NPTy3bM6; 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-182241-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-182241-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 am.mirrors.kernel.org (Postfix) with ESMTPS id D02B71F289BB for ; Fri, 17 May 2024 14:54:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A42A26EB4D; Fri, 17 May 2024 14:53:23 +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="NPTy3bM6" Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) (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 ED51D6BB29 for ; Fri, 17 May 2024 14:53:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715957602; cv=none; b=OtmDNUJBtkj/2bc/uZTq2NT0ZJHYs+seEL1K36KSBYOg1B+2qjikQ9e4HHt90Hy5N21kXiuKosyKwroIFftJVBrTSKrGhU1qKHykbUkxDcF2UObmHppL/XORQIE+iHjliCU+iKOCH7b/8moqlrTjuHFJMYg5O4ylPePjNmSzAUQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715957602; c=relaxed/simple; bh=LVrkH9IVUx7mgbMsu9uapm2fQaZPUX17Rdmp94is1Z0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=tdgcslbqNJaa4HkZmxWguYk/Ahk5NV6zFmLScassQpn9T6VwvO34JRCe0HI07nQFb5EjbeQLsgus+4lq+lnCKbXVEUjl7LNlEog6GEh/tE+UHu5PZfU7e+U3sGXizBClraGcA7TQYNCw48/MUejfdu0ibTzUjNBr8lrMBzG2wb8= 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=NPTy3bM6; arc=none smtp.client-ip=209.85.221.41 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-wr1-f41.google.com with SMTP id ffacd0b85a97d-351cb099fd7so39705f8f.0 for ; Fri, 17 May 2024 07:53:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1715957599; x=1716562399; 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=mlgURxZu8fG6RfbwOGV4+VYUtdkFAEEBFMEpVJI3jww=; b=NPTy3bM6E0lXq0jwhjb19JenvL/DJjvKD8ov/UI2AcOkO53aZQRz30qyEomcU8qSdc 7HjTjof+erEhAsm/J9M6cnI6/Pko65vYIXJ1FtTq/mud6U8dd7yGTKd6HjUOGwgQMJQr HfTD4RFZR+w6hXu5UWvbDs4EQxhZMY0dhvVUQskcRFFvCbl+RA3ghA1uUZLrn5amvnGT fBHp4G21GlST7EdccGQc17NH6zqudGtBpU1gYf03B2DXjsbUS2CKYp7fw31IprQ3d+X+ ymM+5lzvsikTy1o+bYz8uBZYmICHT1lBXOoV2bLbyus8zoJogrI9MF7F7ZF0/jmBWu3k CQlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715957599; x=1716562399; 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=mlgURxZu8fG6RfbwOGV4+VYUtdkFAEEBFMEpVJI3jww=; b=MqD92ITy1lOlGs0yg6BVwoHad0Q4Mj0z5eMC2cn5iGxUIEyAu8xUHi1j2K1mbKmUba J5cCbVUGB+ytfO07Uk0T3sDRjUsjTy2vG5AsfdKUIq9h+FYXA8Q2xb5yx48xtbsTI7RS +9G2heN3M52if5QGzc5eOX/HdpV305V3H/gFPqh4F/2CdmkVpk+f+YkApIHHg4qm1PuR 5TCAxNEY0U50aNIvNYj+psELVB0gHOutBcWZ90MJrCv8u47QcWg8bLOfqHPlP4sKXnPE zDY6Ux5bN49+b92bNaLsLQ35Kwqu5uv18z8yALpS025VnrTipB+8SUUo+aIqEE9V0ooq qbRg== X-Forwarded-Encrypted: i=1; AJvYcCXU3QnxcXfi0yifNXL4xrn/I0prTYyvEpIoBPCRBeFhXNY8IEEPofGcp4jeleGgcr8e97zHpsPkWOaeWEBjqDlM1gNfFq3M1xLdv5ua X-Gm-Message-State: AOJu0YzyunLdNyZjf7W7qNt/Nhtl6YS3fSR+XzF75P5y8y/yi4okxsKd 0Fc/jbPehcRPjbff6V86CuSz0ZIelN10vdNB9oM/Myu2L38wqrsowwzOndRrzm8= X-Received: by 2002:a05:600c:3b86:b0:41a:c04a:8021 with SMTP id 5b1f17b1804b1-41fea52ed5bmr160325795e9.0.1715957599520; Fri, 17 May 2024 07:53:19 -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.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 May 2024 07:53:19 -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 03/16] riscv: hwprobe: export Zimop ISA extension Date: Fri, 17 May 2024 16:52:43 +0200 Message-ID: <20240517145302.971019-4-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 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 204cd4433af5..48be38e0b788 100644 --- a/Documentation/arch/riscv/hwprobe.rst +++ b/Documentation/arch/riscv/hwprobe.rst @@ -192,6 +192,10 @@ The following keys are defined: supported as defined in the RISC-V ISA manual starting from commit d8ab5c78c207 ("Zihintpause is ratified"). + * :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 31c570cbd1c5..3b16a12204b1 100644 --- a/arch/riscv/include/uapi/asm/hwprobe.h +++ b/arch/riscv/include/uapi/asm/hwprobe.h @@ -60,6 +60,7 @@ struct riscv_hwprobe { #define RISCV_HWPROBE_EXT_ZACAS (1ULL << 34) #define RISCV_HWPROBE_EXT_ZICOND (1ULL << 35) #define RISCV_HWPROBE_EXT_ZIHINTPAUSE (1ULL << 36) +#define RISCV_HWPROBE_EXT_ZIMOP (1ULL << 37) #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 969ef3d59dbe..fc6f4238f0b3 100644 --- a/arch/riscv/kernel/sys_hwprobe.c +++ b/arch/riscv/kernel/sys_hwprobe.c @@ -112,6 +112,7 @@ static void hwprobe_isa_ext0(struct riscv_hwprobe *pair, EXT_KEY(ZACAS); EXT_KEY(ZICOND); EXT_KEY(ZIHINTPAUSE); + EXT_KEY(ZIMOP); if (has_vector()) { EXT_KEY(ZVBB); -- 2.43.0