Received: by 2002:a05:6500:1b41:b0:1fb:d597:ff75 with SMTP id cz1csp77502lqb; Tue, 4 Jun 2024 05:47:43 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX+qPcJ8AJWlKn1XSy/s9KHnrjWUFIXHOnJDuYCY+9AzEYKUOYRqFoGjTFxN1K5LE1UtRLYhmuvMm9e33f+5WEAkumAG8QSneIKXhvWUA== X-Google-Smtp-Source: AGHT+IEVA85BBGtf+QgGCPJ5XUzDaqszQ2ijSwjDPLib6KuJqoF9t23nkqypE3L+NR3Skg+65dSw X-Received: by 2002:a17:906:1ccf:b0:a58:e8c7:c0b8 with SMTP id a640c23a62f3a-a681fc5ba94mr806578566b.7.1717505263152; Tue, 04 Jun 2024 05:47:43 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717505263; cv=pass; d=google.com; s=arc-20160816; b=pe231f2IqE83UT3FmZopHvdCAW88DpExOfXXk1EqmA5+ZdoTPWz01EpE7KhUfReqYa wXvYALuIsjj2IFMAqBbY4cRDc8hhsC2za8GUCylls2C5T/Gx++nOtLWaTp8FsGIirZ8Z YOFJOodsgp7BQZVAqD6fynpnd2T2MKnIP0UfsH3qqd06hZTNMJnF1aZt7Ryvn0nJHVNl ENR7HY2G6HoDM8IKkkZpfZ7ne23eUkeZ0o8xCW1PeV/TRlE67DZ9u7Q0tcCrOn+j2VA2 G/g8AI97rirpXfykkN4/gHMVGuJY/Jz/pYOkwYGuk2Ls3Nk4CI5WepgEgJt8bg7pcRLW RMNg== 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=degCLXX+XHlviO1qHS0Zal5T+84ciDG6Q4Lb35fjmT4=; fh=OlqvJOW9tiqr/OCbw47K062k1sLRVj+Et7jNn9yu6MY=; b=equKXYro2VleHIm8eFDPLdfulWL8dbmq7uV3k2otAMSL5Cx/cgQwc/gr5Qumqeg2Y3 gAygOBCwGpOmPs0zXWwunp/Dc8/2qgmWKCExtWP2AsiBWCUNAJTwmyIcTLVtYRu8k+qa JrlQAZ52tiliqHtN460xVVaR4Nfe0HWg+D/HiHtUG4Bz3v6m6E9joyGAHPEM33yXCJoD 7pjlyZeSdPbXT3zkhHrI5TXnXuR2BE0q3WKN6CNIXJi1BNW8BqUudD0B4qCnsmy+KUvF VOM3xxG6X1k9i9Va+wcLqDiE8I8lDv+X1bv/F1ApHghUE+b+NS3SG5B6wlFv1moDBISu HJiw==; 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=wTwg3NIt; 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-200628-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-200628-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 a640c23a62f3a-a68c9ea102fsi318946466b.342.2024.06.04.05.47.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 05:47:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-200628-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=wTwg3NIt; 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-200628-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-200628-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 9A0271F26B9A for ; Tue, 4 Jun 2024 12:47:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 259E3146A72; Tue, 4 Jun 2024 12:46:47 +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="wTwg3NIt" Received: from mail-pg1-f181.google.com (mail-pg1-f181.google.com [209.85.215.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 E456F1465A2 for ; Tue, 4 Jun 2024 12:46:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.181 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717505206; cv=none; b=UNuE09hT5Vc37HUwhNWczhTp9NKYryFSZsLQXkxufi6DbRk08DVKPjPIcU8K6LpAf3/c3e7IJMqYJA8qSogyt/0fV96lGc316ilqqCcHxgIhZKWttozP6ePWnZBk60/elyJ+KW2+IHTn5F0JuhnXlBTFZoxEU/HG7q536Bm4eFA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717505206; c=relaxed/simple; bh=u3voDzK8CVxidyc2YL89EYzm/B6QMmSUx4PrrWzNx6A=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=ggyZcIBYHRK47Lz8Q14zN94T9Oa2kn3KzFirZWvRVd/b6gQCzj4mVKz8HQHWX+We0JoiuYl2Dqsyy7fCdvMyIT88OkWrOEfDDAv7IuYkEYPwSndzhxQHDgn2fzrqg+NHAusTGCntr7qIOphtoakLSJp9UeTYmyM56ZywlLVywes= 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=wTwg3NIt; arc=none smtp.client-ip=209.85.215.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-pg1-f181.google.com with SMTP id 41be03b00d2f7-64ecc2f111dso648527a12.2 for ; Tue, 04 Jun 2024 05:46:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1717505204; x=1718110004; 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=degCLXX+XHlviO1qHS0Zal5T+84ciDG6Q4Lb35fjmT4=; b=wTwg3NIttiCuPs4s/xNU71lHdPlDPb4s3T/uxVhqUCGYeWZJEyjMcQ0qYuGprg5fFu iKOecg+YIFrdyGtzyME+oiudsmSUDG4Gps3twPwnRpSXPbztogy4QlAW6hC0DM5sBVSe 4zAO7QgccZXvGjD2IGSnhn6Oncr9x2Ot8FZwZjXlmqdQLRNUQruWqvinJi+3Sprw/VNv kgTVwsypgA97K8GjH7djCsHlaffqpO3tH8em2h6aIhRF1otrqXasO2Rn8kyGXG4Aykij 7LLkUyzOFwiQqNLnnM/RlW9J/Abj2LU8X3JRykmk+7d+LerAL5++Vc+bkAK1ZxpQCRmU SMWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717505204; x=1718110004; 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=degCLXX+XHlviO1qHS0Zal5T+84ciDG6Q4Lb35fjmT4=; b=TCEZZ4hfEXGsc6ha4lvYyljZl356hMVXaYzCCqM85DO6H4sjElQUpfFAcEOHXKpdh4 Dar41qpzuRra5a+ozpQLVPYYY0aAjHJXu/qmuDpaCk6ZLkRZBQMnah8HZWkfEzhHulyh ms8kk8aXmsqvx8dp2N1f+T5CWJWskrROmdOpI2Dlwp/CZatRhkYXqbHhhiP3TPIPsICm nIe+WGQlTkKTDRbb8SW9g1pmEGNT7fHXGW9cxFWKQPlA2TtyRIvhnzwVbfKjejeS/0JT e36FU45/iBzEeh9afGtpJLk4XW+dLZ8K9Pda2aR7wUCgh/M7XJNKLVjIggCgUx2+rF+i j50g== X-Forwarded-Encrypted: i=1; AJvYcCUQigYthNmNy7Fwd3ZdM/Cza+2QWWYzcY1QPBKuAxfhm5bUwtLROpZP8qofD93YG//gMocOoBDHngzuUbzWb9mRcOPSGP8NzXfRoCow X-Gm-Message-State: AOJu0YzAExKNjb/CASmoQtbYDpijR19l6aoEIR3H7Kh65roCgp2N0F5+ EC6EUdoxE3EkEYMB0jKWRSonZqOsFyKSiTwvn0d17GdQZyTOlVOkHOF0VOTKyAA= X-Received: by 2002:a05:6a21:339e:b0:1af:d9a3:f3a3 with SMTP id adf61e73a8af0-1b26f327d1amr13632883637.4.1717505204132; Tue, 04 Jun 2024 05:46:44 -0700 (PDT) Received: from carbon-x1.. ([2a01:e0a:999:a3a0:327b:5ba3:8154:37ed]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f6323ebc69sm83042885ad.211.2024.06.04.05.46.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 05:46:43 -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, Charlie Jenkins Subject: [PATCH v6 03/16] riscv: hwprobe: export Zimop ISA extension Date: Tue, 4 Jun 2024 14:45:35 +0200 Message-ID: <20240604124550.3214710-4-cleger@rivosinc.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240604124550.3214710-1-cleger@rivosinc.com> References: <20240604124550.3214710-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 Reviewed-by: Charlie Jenkins --- 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 dda76a05420b..575b95744843 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.45.1