Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp1376953lqb; Thu, 30 May 2024 08:27:49 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXlTvAte2XQEGCJ0NBy+w8CwDcZu8BXCyXxiurSJR7sEqlVeRHiGL/S+LdelPEYEb5/ARdkWWfIIXwNf9e3iGTkJJVZ/eWqdpkAhXUuZA== X-Google-Smtp-Source: AGHT+IGmFjwN9DBBt/jfoiFA32rY/zag2ClQHI3GJ4SGZJsO03exBGMbEcTbnu2EpxQzr9JDmmLC X-Received: by 2002:a05:6a00:4094:b0:6f4:5531:7ce4 with SMTP id d2e1a72fcca58-702311de01dmr2460699b3a.33.1717082869542; Thu, 30 May 2024 08:27:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717082869; cv=pass; d=google.com; s=arc-20160816; b=rv3Nyaquabc/T+Cb9DxqnjK5sSXn7oZDRy/8nSXxifsDZhDGwpY0/tw4Lk4K4U2zP9 SkLFvyH5rZyda3BzXqcHEJ/264qj9gcl/kguxrElC+mWGn2p7XM5gtN5Ky2LVnCxdGnv zyFFYtdwv7vRth1qmMs5uWDIHOVAOpCMYbQh3YyQ5owMbp39ebZHveJDxMH/PJxSG5Mp tsBMhl3awRiLp974MNE+01gCEA5CbWWUdCfdIyEWEWljpesyyKoQ2tETBshJ9l8UagAz I7PwVWG5jai2UgQyaLFaJkZwV2nkDiIieT14ZojGJFY0b0kRj/xy9u5KWcGctHd8ShZE Y7vg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=xpRgYa4dwqPbFkBgIi25CyTHChxu5ecl64Veh8E6qX4=; fh=otHJJmQYxm1PNGLz+Xp2VHYbGvFAsHNeHu4jGOS/+qs=; b=q8Xo5eLTRNIi1T02SivlxtWXEA1/nsS4Dgvqpf865D+52vvsGEivXYOxv8Seer2Xz0 jR2Vx5IPvcatFB4WkrAgxX5DtvCzjJCyeG7T+xWnSnaBIBKnNggmfDl2Z5bJd/7PnL7b bJ+Djm7iqnyBKJGc4ibIghMBIbv31ZWs41l2obe7zB5OZIytyGurVPqt/7IlMOXGPA3O /YPdzM7qOXJJnGm/PCMaRHjxITXkuKSUnucJQ8UicRIPTJVQpEznxk2CpAVSbX6frNTN aDduzSHLBovje8ZegJ2weM7Mw63E37M3yg4EqYWfm9xY8hEHa6c4jjp52xyeKcvHOjBh dwXw==; 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=z5CDVYIG; 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-195596-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-195596-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-68229d0f6b5si12596133a12.696.2024.05.30.08.27.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 May 2024 08:27:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-195596-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=z5CDVYIG; 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-195596-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-195596-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 283D1285458 for ; Thu, 30 May 2024 15:26:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7588D17C22B; Thu, 30 May 2024 15:25:50 +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="z5CDVYIG" Received: from mail-pf1-f181.google.com (mail-pf1-f181.google.com [209.85.210.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 D03521E890 for ; Thu, 30 May 2024 15:25:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.181 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717082749; cv=none; b=e+ft5sI5qidDnnqVKYuYo75c/fwQN/ZzhhdIUu11TUhUiaNnIB1RGDc68PQRkppvz6/iaZ3L5HZnrwrjuOeGXPG4ouS/m3CBber4yFy2RBQ7hGowcdTOmqezHb3VbblG/kwKSTFPKrRVZoKpcQTFi1WoGe7GkEg0Xjx5m6wxe3E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717082749; c=relaxed/simple; bh=fd1CgIjmBOyomD+Pnh5fnNX6kDghini1LPZ3u8UMMJY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Va2QU/K2mbWttKZaY74piHZJHBc8e4VX3WfG5rdB7M6fuEMZmjmhxoGyxkeOjPmS/bNBoNNCxVS+REVASGTHe/7VSymNAiHaOVQPZ9grueUnWKGOPiB4IVglNT8u42zgL5saBXBOhgxqqBAfHuVP8bjq8S1FjUjaaJbyu2gkMqU= 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=z5CDVYIG; arc=none smtp.client-ip=209.85.210.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-pf1-f181.google.com with SMTP id d2e1a72fcca58-70231ac9093so758600b3a.3 for ; Thu, 30 May 2024 08:25:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1717082746; x=1717687546; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=xpRgYa4dwqPbFkBgIi25CyTHChxu5ecl64Veh8E6qX4=; b=z5CDVYIGJaC+PaiHOtHpimys4OtLCvMq1Xt9BUH52nOFAV+n0m4vDksVaiVxw9dTpI frKxKTV0r8vJzMm/QWiO5/uX3zQ1QVPwubKsWADQdDCD9jPQ1zdpBeIgaVW/T9EprtfL Hn+GzLB1CFXHa1ABRVi7od3cXprMdWBhXRMjujapkM57HCazxof29NpONN+xO7m6g6MU QGLdp/Vytz9aKgZNinWw9lDG/2Py9ZCc54kUDcktkq34PmY1KqlB/lQteUWdkIaQX5H0 3508GfU81bGwEXEbJ88tawmfBeCRlAPMNCG8FfBkfRy1rmte1o16aOX1ERfiunTxBprG jqEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717082746; x=1717687546; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=xpRgYa4dwqPbFkBgIi25CyTHChxu5ecl64Veh8E6qX4=; b=UwpeV6gvKP6SegcJsGiYKEFIhtfZdrk0EZNnEZ5iyAlsA7FsWnboA7viiOzXlbZdYv Ez6rjhy9uxbcA7rUEQZ5K1T2jlrv51/cli4tWMfMJHbOUJjUJCrHW0j/FxRvgoi+rsuE toO4HLjY2vYM2iqKGewZWaS+ZRVQsxS/RPDUzG3t/+o7zafZjSOvZKI2WfhI+FtU6F6h V7lGUWQJz722VbDqeHACwUze4AedylT+2Im5c9h/jCqFEP0axXm3w9z0BQZlXnuRYBap jL8BY1WP3s21Kxy2DhUUijoRf7KMO83Ej9N9O3Iv6+CgMrhHQ1JZez7bD3QXpu2dUhvT x8IA== X-Forwarded-Encrypted: i=1; AJvYcCURMw7IFj4DmbaW3BtSZPGsiELwuR3SNyjncVH8zB2a93fmkXF7bFkMpx9Ult9yrnJhLgRGo1rTtQcfQ6QrX8rolyf8YwkFBc9xxrl0 X-Gm-Message-State: AOJu0Yx9/r1v/8PjmEqrYx0YUP0LmUheGeuRcJYe0htdimy/vEep88wJ sHavuCUKG7vo62K8vnWBmsjyvOdRCYIpcNwQ/kQSch8QaG3RpUuwvjYNMMk6Ekw= X-Received: by 2002:a05:6a20:5647:b0:1ad:5325:d9b7 with SMTP id adf61e73a8af0-1b26460b6bbmr2226154637.52.1717082746244; Thu, 30 May 2024 08:25:46 -0700 (PDT) Received: from ghost ([50.145.13.30]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7022b6c6047sm1848587b3a.46.2024.05.30.08.25.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 May 2024 08:25:45 -0700 (PDT) Date: Thu, 30 May 2024 08:25:42 -0700 From: Charlie Jenkins To: =?iso-8859-1?Q?Cl=E9ment_L=E9ger?= Cc: Jonathan Corbet , Paul Walmsley , Palmer Dabbelt , Albert Ou , Conor Dooley , Rob Herring , Krzysztof Kozlowski , Anup Patel , Shuah Khan , 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: Re: [PATCH v5 09/16] riscv: hwprobe: export Zca, Zcf, Zcd and Zcb ISA extensions Message-ID: References: <20240517145302.971019-1-cleger@rivosinc.com> <20240517145302.971019-10-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=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20240517145302.971019-10-cleger@rivosinc.com> On Fri, May 17, 2024 at 04:52:49PM +0200, Cl?ment L?ger wrote: > Export Zca, Zcf, Zcd and Zcb ISA extension through hwprobe. > > Signed-off-by: Cl?ment L?ger > --- > Documentation/arch/riscv/hwprobe.rst | 20 ++++++++++++++++++++ > arch/riscv/include/uapi/asm/hwprobe.h | 4 ++++ > arch/riscv/kernel/sys_hwprobe.c | 4 ++++ > 3 files changed, 28 insertions(+) > > diff --git a/Documentation/arch/riscv/hwprobe.rst b/Documentation/arch/riscv/hwprobe.rst > index 48be38e0b788..cad84f51412d 100644 > --- a/Documentation/arch/riscv/hwprobe.rst > +++ b/Documentation/arch/riscv/hwprobe.rst > @@ -196,6 +196,26 @@ The following keys are defined: > supported as defined in the RISC-V ISA manual starting from commit > 58220614a5f ("Zimop is ratified/1.0"). > > + * :c:macro:`RISCV_HWPROBE_EXT_ZCA`: The Zca extension part of Zc* standard > + extensions for code size reduction, as ratified in commit 8be3419c1c0 > + ("Zcf doesn't exist on RV64 as it contains no instructions") of > + riscv-code-size-reduction. > + > + * :c:macro:`RISCV_HWPROBE_EXT_ZCB`: The Zcb extension part of Zc* standard > + extensions for code size reduction, as ratified in commit 8be3419c1c0 > + ("Zcf doesn't exist on RV64 as it contains no instructions") of > + riscv-code-size-reduction. > + > + * :c:macro:`RISCV_HWPROBE_EXT_ZCD`: The Zcd extension part of Zc* standard > + extensions for code size reduction, as ratified in commit 8be3419c1c0 > + ("Zcf doesn't exist on RV64 as it contains no instructions") of > + riscv-code-size-reduction. > + > + * :c:macro:`RISCV_HWPROBE_EXT_ZCF`: The Zcf extension part of Zc* standard > + extensions for code size reduction, as ratified in commit 8be3419c1c0 > + ("Zcf doesn't exist on RV64 as it contains no instructions") of > + riscv-code-size-reduction. > + > * :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 3b16a12204b1..652b2373729f 100644 > --- a/arch/riscv/include/uapi/asm/hwprobe.h > +++ b/arch/riscv/include/uapi/asm/hwprobe.h > @@ -61,6 +61,10 @@ struct riscv_hwprobe { > #define RISCV_HWPROBE_EXT_ZICOND (1ULL << 35) > #define RISCV_HWPROBE_EXT_ZIHINTPAUSE (1ULL << 36) > #define RISCV_HWPROBE_EXT_ZIMOP (1ULL << 37) > +#define RISCV_HWPROBE_EXT_ZCA (1ULL << 38) > +#define RISCV_HWPROBE_EXT_ZCB (1ULL << 39) > +#define RISCV_HWPROBE_EXT_ZCD (1ULL << 40) > +#define RISCV_HWPROBE_EXT_ZCF (1ULL << 41) > #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 fc6f4238f0b3..11def345a42d 100644 > --- a/arch/riscv/kernel/sys_hwprobe.c > +++ b/arch/riscv/kernel/sys_hwprobe.c > @@ -113,6 +113,8 @@ static void hwprobe_isa_ext0(struct riscv_hwprobe *pair, > EXT_KEY(ZICOND); > EXT_KEY(ZIHINTPAUSE); > EXT_KEY(ZIMOP); > + EXT_KEY(ZCA); > + EXT_KEY(ZCB); > > if (has_vector()) { > EXT_KEY(ZVBB); > @@ -133,6 +135,8 @@ static void hwprobe_isa_ext0(struct riscv_hwprobe *pair, > EXT_KEY(ZFH); > EXT_KEY(ZFHMIN); > EXT_KEY(ZFA); > + EXT_KEY(ZCD); > + EXT_KEY(ZCF); > } > #undef EXT_KEY > } > -- > 2.43.0 > > > _______________________________________________ > linux-riscv mailing list > linux-riscv@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-riscv Reviewed-by: Charlie Jenkins