Skip to content

Commit f4922b6

Browse files
luxukernelPaul Walmsley
authored andcommitted
riscv: hwprobe: Export Zalasr extension
Export the Zalasr extension to userspace using hwprobe. Signed-off-by: Xu Lu <luxu.kernel@bytedance.com> Link: https://patch.msgid.link/20251020042056.30283-4-luxu.kernel@bytedance.com Signed-off-by: Paul Walmsley <pjw@kernel.org>
1 parent 4640be2 commit f4922b6

3 files changed

Lines changed: 6 additions & 1 deletion

File tree

Documentation/arch/riscv/hwprobe.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,9 @@ The following keys are defined:
249249
defined in the in the RISC-V ISA manual starting from commit e87412e621f1
250250
("integrate Zaamo and Zalrsc text (#1304)").
251251

252+
* :c:macro:`RISCV_HWPROBE_EXT_ZALASR`: The Zalasr extension is supported as
253+
frozen at commit 194f0094 ("Version 0.9 for freeze") of riscv-zalasr.
254+
252255
* :c:macro:`RISCV_HWPROBE_EXT_ZALRSC`: The Zalrsc extension is supported as
253256
defined in the in the RISC-V ISA manual starting from commit e87412e621f1
254257
("integrate Zaamo and Zalrsc text (#1304)").
@@ -369,4 +372,4 @@ The following keys are defined:
369372

370373
* :c:macro:`RISCV_HWPROBE_VENDOR_EXT_XSFVFWMACCQQQ`: The Xsfvfwmaccqqq
371374
vendor extension is supported in version 1.0 of Matrix Multiply Accumulate
372-
Instruction Extensions Specification.
375+
Instruction Extensions Specification.

arch/riscv/include/uapi/asm/hwprobe.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ struct riscv_hwprobe {
8282
#define RISCV_HWPROBE_EXT_ZAAMO (1ULL << 56)
8383
#define RISCV_HWPROBE_EXT_ZALRSC (1ULL << 57)
8484
#define RISCV_HWPROBE_EXT_ZABHA (1ULL << 58)
85+
#define RISCV_HWPROBE_EXT_ZALASR (1ULL << 59)
8586
#define RISCV_HWPROBE_KEY_CPUPERF_0 5
8687
#define RISCV_HWPROBE_MISALIGNED_UNKNOWN (0 << 0)
8788
#define RISCV_HWPROBE_MISALIGNED_EMULATED (1 << 0)

arch/riscv/kernel/sys_hwprobe.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ static void hwprobe_isa_ext0(struct riscv_hwprobe *pair,
109109
EXT_KEY(ZAAMO);
110110
EXT_KEY(ZABHA);
111111
EXT_KEY(ZACAS);
112+
EXT_KEY(ZALASR);
112113
EXT_KEY(ZALRSC);
113114
EXT_KEY(ZAWRS);
114115
EXT_KEY(ZBA);

0 commit comments

Comments
 (0)