From patchwork Mon Oct 28 07:17:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Inochi Amaoto X-Patchwork-Id: 13853110 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 63AF2D13595 for ; Mon, 28 Oct 2024 07:19:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=O95UFC16Tez0YTX3qpeGjj/OmUauBypQ+GmrWqkFe/I=; b=45q3POsmcJyFyb Fho19/a9ms9Dvi3eOmDlf9bWroT8IS+wZegHj3v30rLy1offqlUhBkDUfqqo25i7n4sXtotH1Lj9a tDgmXKpuDO4ImXCiW3WCGujtN+T6J7u2kLzwqbCtBU7pW3FkpyjIc85qSOOLvhCScDIP5TOIJE8U5 /anEBRbNzrDepGFbJedy0JEiQjgU2BunRLPvqIBrDwFuA/nfAdK/sMADt7NAnUeicThURsMVWx2Y1 Inj4XkbMPCcYjDzv5TcNQRHGM23RMzoPnT1bJaHyvoZjfnWZn2danRwgnBjLGl6r2BrfpDmGDSQ9q atEhZQcdtnd/ug0mZJKg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t5K1n-00000009qGF-1UjJ; Mon, 28 Oct 2024 07:19:03 +0000 Received: from mail-pf1-x436.google.com ([2607:f8b0:4864:20::436]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t5K11-00000009poq-20bQ for linux-riscv@lists.infradead.org; Mon, 28 Oct 2024 07:18:16 +0000 Received: by mail-pf1-x436.google.com with SMTP id d2e1a72fcca58-71e49ad46b1so2560469b3a.1 for ; Mon, 28 Oct 2024 00:18:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730099894; x=1730704694; darn=lists.infradead.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=HHcOCAQRVF6wDwCpz/Ofc5RAAihYPSYxf02RxaoduNk=; b=F3DDyND8Sf1lshcZqkEL9BUzZnEgy8eoTgajIiavJLip4CTJ8VfGYpSKImGa71nfiV nMDPIhNJSZ+Z5/emqkhWcsKpfHURSgxdlFUHXXf8KRgx2aTFS0jBrWeBAf4eAW+fJ/JG nuCBCA7TEPtbwIcI/NufLryGz/WayqVSzrYgRIr2QvzLxcReA8tEfaqNvTsCWzRx/Pl7 EHkwXu4NtzZFFN7efpLGyr6haNpdr+q+XJ9qg06ea2+3qS5g/J6IRBRk8CMv6bmJP/mw qhSsxI5GUORhKfzj7LO1+v9c+DxXpHBGXLcvoHFAoDN3FLJwi3B+2UFUfPwoE+V6dek0 wvtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730099894; x=1730704694; 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=HHcOCAQRVF6wDwCpz/Ofc5RAAihYPSYxf02RxaoduNk=; b=kM9ay7lFgIQ4LXuTel42X9p+xfm25NLER1vf9Rs2WaXdTkSFqmH+QkTnA2N759TnKj JKbo3b6DaTTx0lXLnyZLTe8e6yBM1p+4E1i0iXon/XBQa2Gm0JaG3DOLEpeVC0F7rx1o /Kj4tPrmzpDSXWxYXhhC5qIiSFjEm+AFs4UcfSyDwLcl85KB+CEdEHs7fpPhFIXKBYRD OiSm440/+krNK5iEF3S2jUx4fxravINS1EbnXcSATVcRd5atLTW9LW/G4uTz5F/+tUo3 WKxynNUJCn0miQqvMVQil7iiqXieUmN0xE26NBYY3JNy9aILV8VS2YXFIVH3ZM0nQ5+U YGxw== X-Forwarded-Encrypted: i=1; AJvYcCVjvzTTFrxcbbThVASemNkelYeuVzPd+ky93scK1Hco9ja84SxwBiM302NTi0/vY8OsXTj2KVppQ5f8qQ==@lists.infradead.org X-Gm-Message-State: AOJu0Yzt1WKVmY3/Pb7EaIEd/tiRGvFNvbmZThdOhmRaXVEHJihT1uWQ SytN3S4FHJIIWj9sv5KpDzVxUiJeFBNgA4DIg3mPMSon+T70F2Yx X-Google-Smtp-Source: AGHT+IGxScLweOV74hsHY8ybM05gxHwS+UEjeyeywhEqzfUmk+ssuwJt1d5kawmlBhnicXPFtNf0HQ== X-Received: by 2002:a05:6a00:845:b0:71e:6e4a:507a with SMTP id d2e1a72fcca58-72062f4f6c2mr9457615b3a.3.1730099894293; Mon, 28 Oct 2024 00:18:14 -0700 (PDT) Received: from localhost ([2001:da8:7001:11::cb]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72057a21933sm5266089b3a.173.2024.10.28.00.18.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Oct 2024 00:18:14 -0700 (PDT) From: Inochi Amaoto To: Jonathan Corbet , Paul Walmsley , Palmer Dabbelt , Albert Ou , Conor Dooley , Rob Herring , Krzysztof Kozlowski , =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= , Evan Green , Charlie Jenkins , Andrew Jones , Andy Chiu , Inochi Amaoto , Xiao Wang , Samuel Holland Cc: linux-doc@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH 1/3] dt-bindings: riscv: add bfloat16 ISA extension description Date: Mon, 28 Oct 2024 15:17:41 +0800 Message-ID: <20241028071746.869740-2-inochiama@gmail.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241028071746.869740-1-inochiama@gmail.com> References: <20241028071746.869740-1-inochiama@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241028_001815_541567_9DDD414D X-CRM114-Status: UNSURE ( 9.56 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org Add description for the BFloat16 precision Floating-Point ISA extension, (Zfbfmin, Zvfbfmin, Zvfbfwma). which was ratified in commit 4dc23d62 ("Added Chapter title to BF16") of the riscv-isa-manual. Signed-off-by: Inochi Amaoto --- .../devicetree/bindings/riscv/extensions.yaml | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/Documentation/devicetree/bindings/riscv/extensions.yaml b/Documentation/devicetree/bindings/riscv/extensions.yaml index 2cf2026cff57..99d8b70fa321 100644 --- a/Documentation/devicetree/bindings/riscv/extensions.yaml +++ b/Documentation/devicetree/bindings/riscv/extensions.yaml @@ -277,6 +277,12 @@ properties: instructions, as ratified in commit 056b6ff ("Zfa is ratified") of riscv-isa-manual. + - const: zfbfmin + description: + The standard Zfbfmin extension which provides minimal support for + 16-bit half-precision brain floating-point instructions, as ratified + in commit 4dc23d62 ("Added Chapter title to BF16") of riscv-isa-manual. + - const: zfh description: The standard Zfh extension for 16-bit half-precision binary @@ -467,6 +473,18 @@ properties: in commit 6f702a2 ("Vector extensions are now ratified") of riscv-v-spec. + - const: zvfbfmin + description: + The standard Zvfbfmin extension for minimal support for vectored + 16-bit half-precision brain floating-point instructions, as ratified + in commit 4dc23d62 ("Added Chapter title to BF16") of riscv-isa-manual. + + - const: zvfbfwma + description: + The standard Zvfbfwma extension for vectored half-precision brain + floating-point widening multiply-accumulate instructions, as ratified + in commit 4dc23d62 ("Added Chapter title to BF16") of riscv-isa-manual. + - const: zvfh description: The standard Zvfh extension for vectored half-precision @@ -605,6 +623,33 @@ properties: then: contains: const: zca + # Zfbfmin depends on F + - if: + contains: + const: zfbfmin + then: + contains: + const: f + # Zvfbfmin depends on V or Zve32f + - if: + contains: + const: zvfbfmin + then: + oneOf: + - contains: + const: v + - contains: + const: zve32f + # Zvfbfwma depends on Zfbfmin and Zvfbfmin + - if: + contains: + const: zvfbfwma + then: + allOf: + - contains: + const: zfbfmin + - contains: + const: zvfbfmin allOf: # Zcf extension does not exist on rv64 From patchwork Mon Oct 28 07:17:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Inochi Amaoto X-Patchwork-Id: 13853112 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C2E56D13597 for ; Mon, 28 Oct 2024 07:19:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=yV4MNyYg9uTD+YypQEcPUCP/6zkzQxoFf7rhSlJ31/k=; b=B4lhHTfP+V3hZD 6nbyURqRkAoWslJpvGTn5v0wx+YXYBJrCTEJcNt2fuVnUPtEcui7VNJdCu9jhVZnos52m11BH4HYT V6H8YOzH7dSltnU2iQTZz9f2iElB7HzuxaTwJWrBv1MUXVwLpCgoU/HdumU+MmQEks1yXrOjngTAR /hlEIK5NTPqobRS5iglzdhi34lD4lvn1TIXEz1+Khvvt/kH6RAFNV3C4nOB/Xl1Hovk+Bh513DRmE mpOYlGkCQj4OCNM/n2w9e9RVtmIUxwkmfJFzdm5ZptfePgJ3B12cwlw/LEv7DCBUSguGYB81wud6i iKI206X7LH3UaIYVnQ1A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t5K1o-00000009qH0-0MsL; Mon, 28 Oct 2024 07:19:04 +0000 Received: from mail-pg1-x52f.google.com ([2607:f8b0:4864:20::52f]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t5K14-00000009ppT-0LV3 for linux-riscv@lists.infradead.org; Mon, 28 Oct 2024 07:18:19 +0000 Received: by mail-pg1-x52f.google.com with SMTP id 41be03b00d2f7-7ea68af2f62so3139089a12.3 for ; Mon, 28 Oct 2024 00:18:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730099897; x=1730704697; darn=lists.infradead.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=1uizG+AQKjMiNSyY0/c5FnD4O0HivvPLaMjzCzg5Rho=; b=WH7gwaN3BYrWJy7NdUvuRreAvHSyoNYcDScqnZbpy0cKdynbiHGkGI04vWq+tcT7cM Hm8naosNQheCiRS/1qIwup5lkNJGMGoVx+jpl+n4WwlrJucKQ9lTjPDG3Qgcj8HKVN5G K207JDJR7nZFkuCbccHBZH9vlzejg7/jqTkKOSb61L+vtg5m/r4dM7Ta5Tn2ewtoWUsc EcvIiHhtHf6pCQMrtdSGkTjEpf+mk28Al594q2UOTWSSjRbIYyw2w28g1in6ogBLw1As 7fNhQFQa3EuiVPCFMwRCO7VIsTN0znPqZ1qqv/+oqf/gI352xb7juIAQmV6xmmuPFqSX 3NHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730099897; x=1730704697; 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=1uizG+AQKjMiNSyY0/c5FnD4O0HivvPLaMjzCzg5Rho=; b=jh6ZX958WjfS5y/Gidxg0vMOwPX4nUsjuB+XwPPFAR6nD6pimVN63nezKyXRyvqXDL PTjQMCibK5eG0e6Zn5HiXtoH5urNHf0kNEhJ0m+T18R0OPKl3QHev5UdhTKSdtSVuSEu GqhSNHP8bT2scWIdb+9ObhIK/bBR442GwokonfnwO02Qa9WMMG8egzBGXtP67ALPN7pV pktwc8mp4Z95Zra76+4JdXHpbWptJZ8j9nZZxzVNgNJBE5vtlUW63jzozXNB97VEhsIA VcmyKMBw6qtDGbeGXmZweBHdisH0XoApsZlHS5ef/jFo5rJlvviZJAnJ2T/wuuV5i/JR z01Q== X-Forwarded-Encrypted: i=1; AJvYcCVGV4bBtrLZ9s5UUYsOMqjktvYhYvpARoyydlEI6+OnemlGxdP4nc1YvIOT8KnwGyu96iQI3nCjh6FxYw==@lists.infradead.org X-Gm-Message-State: AOJu0Ywxu6/jqv2wATuOFdyYIu+wqkHQR2JdmhTFirLV5fu81DiFF3JC JRhkhySref+AB2ZOAD01gNNsiN4Xv8P/33MGNMjC//PvtuY4thk9 X-Google-Smtp-Source: AGHT+IHNfSRs9MLweGhcUMEkHy9O8xX5ZL+PQe11n4eSXAbVgAxJpcl9qI0OLy2nv3XOv1wiXZAMEA== X-Received: by 2002:a05:6a20:d807:b0:1d4:fc75:8d48 with SMTP id adf61e73a8af0-1d9a83ab0bemr8870713637.3.1730099896702; Mon, 28 Oct 2024 00:18:16 -0700 (PDT) Received: from localhost ([2001:da8:7001:11::cb]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7205793189esm5056118b3a.58.2024.10.28.00.18.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Oct 2024 00:18:16 -0700 (PDT) From: Inochi Amaoto To: Jonathan Corbet , Paul Walmsley , Palmer Dabbelt , Albert Ou , Conor Dooley , Rob Herring , Krzysztof Kozlowski , =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= , Evan Green , Charlie Jenkins , Andrew Jones , Andy Chiu , Inochi Amaoto , Xiao Wang , Samuel Holland Cc: linux-doc@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH 2/3] riscv: add ISA extension parsing for bfloat16 ISA extension Date: Mon, 28 Oct 2024 15:17:42 +0800 Message-ID: <20241028071746.869740-3-inochiama@gmail.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241028071746.869740-1-inochiama@gmail.com> References: <20241028071746.869740-1-inochiama@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241028_001818_141114_1CCF3EAF X-CRM114-Status: GOOD ( 10.07 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org Add parsing for Zfbmin, Zvfbfmin, Zvfbfwma ISA extension which were ratified in 4dc23d62 ("Added Chapter title to BF16") of the riscv-isa-manual. Signed-off-by: Inochi Amaoto --- arch/riscv/include/asm/hwcap.h | 3 +++ arch/riscv/kernel/cpufeature.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/arch/riscv/include/asm/hwcap.h b/arch/riscv/include/asm/hwcap.h index 46d9de54179e..97657fb63af6 100644 --- a/arch/riscv/include/asm/hwcap.h +++ b/arch/riscv/include/asm/hwcap.h @@ -93,6 +93,9 @@ #define RISCV_ISA_EXT_ZCMOP 84 #define RISCV_ISA_EXT_ZAWRS 85 #define RISCV_ISA_EXT_SVVPTC 86 +#define RISCV_ISA_EXT_ZFBFMIN 87 +#define RISCV_ISA_EXT_ZVFBFMIN 88 +#define RISCV_ISA_EXT_ZVFBFWMA 89 #define RISCV_ISA_EXT_XLINUXENVCFG 127 diff --git a/arch/riscv/kernel/cpufeature.c b/arch/riscv/kernel/cpufeature.c index 3a8eeaa9310c..1b286f5bc591 100644 --- a/arch/riscv/kernel/cpufeature.c +++ b/arch/riscv/kernel/cpufeature.c @@ -325,6 +325,7 @@ const struct riscv_isa_ext_data riscv_isa_ext[] = { __RISCV_ISA_EXT_DATA(zacas, RISCV_ISA_EXT_ZACAS), __RISCV_ISA_EXT_DATA(zawrs, RISCV_ISA_EXT_ZAWRS), __RISCV_ISA_EXT_DATA(zfa, RISCV_ISA_EXT_ZFA), + __RISCV_ISA_EXT_DATA(zfbfmin, RISCV_ISA_EXT_ZFBFMIN), __RISCV_ISA_EXT_DATA(zfh, RISCV_ISA_EXT_ZFH), __RISCV_ISA_EXT_DATA(zfhmin, RISCV_ISA_EXT_ZFHMIN), __RISCV_ISA_EXT_DATA(zca, RISCV_ISA_EXT_ZCA), @@ -357,6 +358,8 @@ const struct riscv_isa_ext_data riscv_isa_ext[] = { __RISCV_ISA_EXT_SUPERSET(zve64d, RISCV_ISA_EXT_ZVE64D, riscv_zve64d_exts), __RISCV_ISA_EXT_SUPERSET(zve64f, RISCV_ISA_EXT_ZVE64F, riscv_zve64f_exts), __RISCV_ISA_EXT_SUPERSET(zve64x, RISCV_ISA_EXT_ZVE64X, riscv_zve64x_exts), + __RISCV_ISA_EXT_DATA(zvfbfmin, RISCV_ISA_EXT_ZVFBFMIN), + __RISCV_ISA_EXT_DATA(zvfbfwma, RISCV_ISA_EXT_ZVFBFWMA), __RISCV_ISA_EXT_DATA(zvfh, RISCV_ISA_EXT_ZVFH), __RISCV_ISA_EXT_DATA(zvfhmin, RISCV_ISA_EXT_ZVFHMIN), __RISCV_ISA_EXT_DATA(zvkb, RISCV_ISA_EXT_ZVKB), From patchwork Mon Oct 28 07:17:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Inochi Amaoto X-Patchwork-Id: 13853113 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4678FD13570 for ; Mon, 28 Oct 2024 07:19:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=u5o5sKb9IGSadXQ7xKJR3idq9/HZpBAeSYtwJA6r5kQ=; b=rklGnMnjZWhpvd HLqquWycQfws4CbwzC522aSQrtjABYFfDuFNVTjwt952S8G7yCM8hHuU+2FC6VdO2RMzW7jIJRd+Q U3QB7uh/arGdVDd2p7GkmVywzShleCRZ8B9MKrFStiJ5yObZ8uNauQYiouGcXIwZ6YBEXVP5Pbw/E NeQbOo5NjxvJ4msHsQ/xx2Wx6rlzS3m8td9HXzOonlJhgY0GdncF6BhluYkc/qAM1yDzl1kVNwFbx awLz7gCQN6nRR7pU6rbslV4yIg+iSYzdCoTazvAMAsLVkMxihAzQdPTW/cZVuKd4d9BR7W6MMZDmu Vgn1apuxAsIZF3/fzBsA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t5K1p-00000009qI0-0GzB; Mon, 28 Oct 2024 07:19:05 +0000 Received: from mail-pl1-x62b.google.com ([2607:f8b0:4864:20::62b]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t5K15-00000009pqI-1A9v for linux-riscv@lists.infradead.org; Mon, 28 Oct 2024 07:18:20 +0000 Received: by mail-pl1-x62b.google.com with SMTP id d9443c01a7336-20c8c50fdd9so30600655ad.0 for ; Mon, 28 Oct 2024 00:18:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730099899; x=1730704699; darn=lists.infradead.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=BAmlP3w7cbuw4vs2LRWu6ikJXLe5vZx2U9ot0QY3nzg=; b=iX/vfBEn88XSyzIinKYJ08hNSEyKnRL8FLJEnBFRW9pYahjZouwcY/0pp45x+In2ct JB6wnXdhS2BVR6TK5tGBi8lrEWSZCHqsQm/+lCBtTosT2RLLpA1blbJ75mUnrYnXmovd m3P/EP2tZ7dZNgVD5ouh8SHZkrM6g4p2d9ufn7A7alzA8acRKk7sbkl24WOi4cku98H7 MjfCDxfi/c0ebxrL4nlSrLv2S2GEhJ95sUlkXPXnFCrVeEIzWrHFTRDrZO2j3EWgaenW +VHQ7W9GoZWVRNGXTTYCdb6j4Ag4lv2Ontwjjmmqv8mKQ28PRjgOtDjkO66ErVuY6QHR 3WgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730099899; x=1730704699; 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=BAmlP3w7cbuw4vs2LRWu6ikJXLe5vZx2U9ot0QY3nzg=; b=XE+TVGhjyHJN1OeiHi0XbM0h7wSFNFYaZrKgjOSVFHPjdo44TWT9VQlrkbdgElfayp IP82b1IhaXtpKUeW+k9aU7/xz7T0SrS0Av2zZK+RHxW3+54nptOV/Urgh0empF+69QGD kuhGYHkd5HDXEDwKTljvafOtk4FhRAy9X+E+ry6MLqQL2DzBb+P6UjT4tkWgc5CM5a8v MHkIyJnJXq7uGqPRfDBpVu0ywQdyHl3yFc2lJPUJ2Nn60SmIOWY21ppGeNJ6EgEHDUjB kg1jGuUkdDwRgY+Gkmka7bGwJhVES2ezsZucsfxaifG9okfIQeUL19w3bxKP/E4xpIdb huGw== X-Forwarded-Encrypted: i=1; AJvYcCU7/A9oE9VUCnIrTW+blF//E47EvYEiKXIrQ1YsOJfk+cpNSuw6Yl6vSFrM+y5M6BNhRThZT5ismbKMAA==@lists.infradead.org X-Gm-Message-State: AOJu0YxzO65k4Q9Ab0J7vgS8igFl7OyNQjitWbcNRKFL5jeXUGVB0Ja6 lLafmX7dvxeEv/H1nWoBgtofpkTaroqZIWmcoCAYOFWZjOfVfEhj X-Google-Smtp-Source: AGHT+IEUoa5ZbRgyUDvT5sSSexEjNU5hWJ5BN3DtO5DSUyaxLGN5Xl3CDpjSkdhit0QPMLIFVQ49lQ== X-Received: by 2002:a17:902:ced2:b0:20b:5aeb:9b8 with SMTP id d9443c01a7336-210c5a7154bmr120474645ad.24.1730099898614; Mon, 28 Oct 2024 00:18:18 -0700 (PDT) Received: from localhost ([2001:da8:7001:11::cb]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-210bbf44550sm45265605ad.14.2024.10.28.00.18.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Oct 2024 00:18:18 -0700 (PDT) From: Inochi Amaoto To: Jonathan Corbet , Paul Walmsley , Palmer Dabbelt , Albert Ou , Conor Dooley , Rob Herring , Krzysztof Kozlowski , =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= , Evan Green , Charlie Jenkins , Andrew Jones , Andy Chiu , Inochi Amaoto , Xiao Wang , Samuel Holland Cc: linux-doc@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH 3/3] riscv: hwprobe: export bfloat16 ISA extension Date: Mon, 28 Oct 2024 15:17:43 +0800 Message-ID: <20241028071746.869740-4-inochiama@gmail.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241028071746.869740-1-inochiama@gmail.com> References: <20241028071746.869740-1-inochiama@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241028_001819_342137_F6F7496A X-CRM114-Status: UNSURE ( 9.79 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org Export Zfbmin, Zvfbfmin, Zvfbfwma ISA extension through hwprobe. Signed-off-by: Inochi Amaoto --- Documentation/arch/riscv/hwprobe.rst | 12 ++++++++++++ arch/riscv/include/uapi/asm/hwprobe.h | 3 +++ 2 files changed, 15 insertions(+) diff --git a/Documentation/arch/riscv/hwprobe.rst b/Documentation/arch/riscv/hwprobe.rst index 85b709257918..8c30dd06f3c0 100644 --- a/Documentation/arch/riscv/hwprobe.rst +++ b/Documentation/arch/riscv/hwprobe.rst @@ -239,6 +239,18 @@ The following keys are defined: ratified in commit 98918c844281 ("Merge pull request #1217 from riscv/zawrs") of riscv-isa-manual. + * :c:macro:`RISCV_HWPROBE_EXT_ZFBFMIN`: The Zfbfmin extension is supported as + defined in the RISC-V ISA manual starting from commit 4dc23d6229de + ("Added Chapter title to BF16"). + + * :c:macro:`RISCV_HWPROBE_EXT_ZVFBFMIN`: The Zvfbfmin extension is supported as + defined in the RISC-V ISA manual starting from commit 4dc23d6229de + ("Added Chapter title to BF16"). + + * :c:macro:`RISCV_HWPROBE_EXT_ZVFBFWMA`: The Zvfbfwma extension is supported as + defined in the RISC-V ISA manual starting from commit 4dc23d6229de + ("Added Chapter title to BF16"). + * :c:macro:`RISCV_HWPROBE_KEY_CPUPERF_0`: Deprecated. Returns similar values to :c:macro:`RISCV_HWPROBE_KEY_MISALIGNED_SCALAR_PERF`, but the key was mistakenly classified as a bitmask rather than a value. diff --git a/arch/riscv/include/uapi/asm/hwprobe.h b/arch/riscv/include/uapi/asm/hwprobe.h index 1e153cda57db..95d00a065b4e 100644 --- a/arch/riscv/include/uapi/asm/hwprobe.h +++ b/arch/riscv/include/uapi/asm/hwprobe.h @@ -72,6 +72,9 @@ struct riscv_hwprobe { #define RISCV_HWPROBE_EXT_ZCF (1ULL << 46) #define RISCV_HWPROBE_EXT_ZCMOP (1ULL << 47) #define RISCV_HWPROBE_EXT_ZAWRS (1ULL << 48) +#define RISCV_HWPROBE_EXT_ZFBFMIN (1ULL << 49) +#define RISCV_HWPROBE_EXT_ZVFBFMIN (1ULL << 50) +#define RISCV_HWPROBE_EXT_ZVFBFWMA (1ULL << 51) #define RISCV_HWPROBE_KEY_CPUPERF_0 5 #define RISCV_HWPROBE_MISALIGNED_UNKNOWN (0 << 0) #define RISCV_HWPROBE_MISALIGNED_EMULATED (1 << 0)