Unverified Commit 9d45d1ff authored by Clément Léger's avatar Clément Léger Committed by Alexandre Ghiti
Browse files

riscv: hwprobe: export Zaamo and Zalrsc extensions



Export the Zaamo and Zalrsc extensions to userspace using hwprobe.

Signed-off-by: default avatarClément Léger <cleger@rivosinc.com>
Reviewed-by: default avatarCharlie Jenkins <charlie@rivosinc.com>
Link: https://lore.kernel.org/r/20240619153913.867263-4-cleger@rivosinc.com


Signed-off-by: default avatarAlexandre Ghiti <alexghiti@rivosinc.com>
parent 35173b66
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -245,6 +245,14 @@ 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_ZAAMO`: The Zaamo extension is supported as
       defined in the in the RISC-V ISA manual starting from commit e87412e621f1
       ("integrate Zaamo and Zalrsc text (#1304)").

  * :c:macro:`RISCV_HWPROBE_EXT_ZALRSC`: The Zalrsc extension is supported as
       defined in the in the RISC-V ISA manual starting from commit e87412e621f1
       ("integrate Zaamo and Zalrsc text (#1304)").

  * :c:macro:`RISCV_HWPROBE_EXT_SUPM`: The Supm extension is supported as
       defined in version 1.0 of the RISC-V Pointer Masking extensions.

+2 −0
Original line number Diff line number Diff line
@@ -79,6 +79,8 @@ struct riscv_hwprobe {
#define		RISCV_HWPROBE_EXT_ZVFBFMIN	(1ULL << 53)
#define		RISCV_HWPROBE_EXT_ZVFBFWMA	(1ULL << 54)
#define		RISCV_HWPROBE_EXT_ZICBOM	(1ULL << 55)
#define		RISCV_HWPROBE_EXT_ZAAMO		(1ULL << 56)
#define		RISCV_HWPROBE_EXT_ZALRSC	(1ULL << 57)
#define RISCV_HWPROBE_KEY_CPUPERF_0	5
#define		RISCV_HWPROBE_MISALIGNED_UNKNOWN	(0 << 0)
#define		RISCV_HWPROBE_MISALIGNED_EMULATED	(1 << 0)
+2 −0
Original line number Diff line number Diff line
@@ -95,7 +95,9 @@ static void hwprobe_isa_ext0(struct riscv_hwprobe *pair,
		 * regardless of the kernel's configuration, as no other checks, besides
		 * presence in the hart_isa bitmap, are made.
		 */
		EXT_KEY(ZAAMO);
		EXT_KEY(ZACAS);
		EXT_KEY(ZALRSC);
		EXT_KEY(ZAWRS);
		EXT_KEY(ZBA);
		EXT_KEY(ZBB);