Unverified Commit a4863e00 authored by Inochi Amaoto's avatar Inochi Amaoto Committed by Alexandre Ghiti
Browse files

riscv: hwprobe: export bfloat16 ISA extension



Export Zfbmin, Zvfbfmin, Zvfbfwma ISA extension through hwprobe.

Signed-off-by: default avatarInochi Amaoto <inochiama@gmail.com>
Reviewed-by: default avatarClément Léger <cleger@rivosinc.com>
Link: https://lore.kernel.org/r/20250213003849.147358-4-inochiama@gmail.com


Signed-off-by: default avatarAlexandre Ghiti <alexghiti@rivosinc.com>
parent e186c28d
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -242,6 +242,18 @@ The following keys are defined:
  * :c:macro:`RISCV_HWPROBE_EXT_SUPM`: The Supm extension is supported as
       defined in version 1.0 of the RISC-V Pointer Masking extensions.

  * :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.
+3 −0
Original line number Diff line number Diff line
@@ -73,6 +73,9 @@ struct riscv_hwprobe {
#define		RISCV_HWPROBE_EXT_ZCMOP		(1ULL << 47)
#define		RISCV_HWPROBE_EXT_ZAWRS		(1ULL << 48)
#define		RISCV_HWPROBE_EXT_SUPM		(1ULL << 49)
#define		RISCV_HWPROBE_EXT_ZFBFMIN	(1ULL << 50)
#define		RISCV_HWPROBE_EXT_ZVFBFMIN	(1ULL << 51)
#define		RISCV_HWPROBE_EXT_ZVFBFWMA	(1ULL << 52)
#define RISCV_HWPROBE_KEY_CPUPERF_0	5
#define		RISCV_HWPROBE_MISALIGNED_UNKNOWN	(0 << 0)
#define		RISCV_HWPROBE_MISALIGNED_EMULATED	(1 << 0)
+3 −0
Original line number Diff line number Diff line
@@ -131,6 +131,8 @@ static void hwprobe_isa_ext0(struct riscv_hwprobe *pair,
			EXT_KEY(ZVE64D);
			EXT_KEY(ZVE64F);
			EXT_KEY(ZVE64X);
			EXT_KEY(ZVFBFMIN);
			EXT_KEY(ZVFBFWMA);
			EXT_KEY(ZVFH);
			EXT_KEY(ZVFHMIN);
			EXT_KEY(ZVKB);
@@ -147,6 +149,7 @@ static void hwprobe_isa_ext0(struct riscv_hwprobe *pair,
			EXT_KEY(ZCD);
			EXT_KEY(ZCF);
			EXT_KEY(ZFA);
			EXT_KEY(ZFBFMIN);
			EXT_KEY(ZFH);
			EXT_KEY(ZFHMIN);
		}