Skip to content

Commit 6118ebe

Browse files
wpcwzyPaul Walmsley
authored andcommitted
riscv: hwprobe: export Zilsd and Zclsd ISA extensions
Export Zilsd and Zclsd ISA extensions through hwprobe. Signed-off-by: Pincheng Wang <pincheng.plct@isrc.iscas.ac.cn> Reviewed-by: Nutty Liu <nutty.liu@hotmail.com> Link: https://patch.msgid.link/20250826162939.1494021-4-pincheng.plct@isrc.iscas.ac.cn [pjw@kernel.org: fixed whitespace; updated to apply] Signed-off-by: Paul Walmsley <pjw@kernel.org>
1 parent 3f0cbfb commit 6118ebe

3 files changed

Lines changed: 13 additions & 0 deletions

File tree

Documentation/arch/riscv/hwprobe.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,14 @@ The following keys are defined:
281281
* :c:macro:`RISCV_HWPROBE_EXT_ZICBOP`: The Zicbop extension is supported, as
282282
ratified in commit 3dd606f ("Create cmobase-v1.0.pdf") of riscv-CMOs.
283283

284+
* :c:macro:`RISCV_HWPROBE_EXT_ZILSD`: The Zilsd extension is supported as
285+
defined in the RISC-V ISA manual starting from commit f88abf1 ("Integrating
286+
load/store pair for RV32 with the main manual") of the riscv-isa-manual.
287+
288+
* :c:macro:`RISCV_HWPROBE_EXT_ZCLSD`: The Zclsd extension is supported as
289+
defined in the RISC-V ISA manual starting from commit f88abf1 ("Integrating
290+
load/store pair for RV32 with the main manual") of the riscv-isa-manual.
291+
284292
* :c:macro:`RISCV_HWPROBE_KEY_CPUPERF_0`: Deprecated. Returns similar values to
285293
:c:macro:`RISCV_HWPROBE_KEY_MISALIGNED_SCALAR_PERF`, but the key was
286294
mistakenly classified as a bitmask rather than a value.

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ struct riscv_hwprobe {
8484
#define RISCV_HWPROBE_EXT_ZABHA (1ULL << 58)
8585
#define RISCV_HWPROBE_EXT_ZALASR (1ULL << 59)
8686
#define RISCV_HWPROBE_EXT_ZICBOP (1ULL << 60)
87+
#define RISCV_HWPROBE_EXT_ZILSD (1ULL << 61)
88+
#define RISCV_HWPROBE_EXT_ZCLSD (1ULL << 62)
89+
8790
#define RISCV_HWPROBE_KEY_CPUPERF_0 5
8891
#define RISCV_HWPROBE_MISALIGNED_UNKNOWN (0 << 0)
8992
#define RISCV_HWPROBE_MISALIGNED_EMULATED (1 << 0)

arch/riscv/kernel/sys_hwprobe.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ static void hwprobe_isa_ext0(struct riscv_hwprobe *pair,
121121
EXT_KEY(ZBS);
122122
EXT_KEY(ZCA);
123123
EXT_KEY(ZCB);
124+
EXT_KEY(ZCLSD);
124125
EXT_KEY(ZCMOP);
125126
EXT_KEY(ZICBOM);
126127
EXT_KEY(ZICBOP);
@@ -130,6 +131,7 @@ static void hwprobe_isa_ext0(struct riscv_hwprobe *pair,
130131
EXT_KEY(ZIHINTNTL);
131132
EXT_KEY(ZIHINTPAUSE);
132133
EXT_KEY(ZIHPM);
134+
EXT_KEY(ZILSD);
133135
EXT_KEY(ZIMOP);
134136
EXT_KEY(ZKND);
135137
EXT_KEY(ZKNE);

0 commit comments

Comments
 (0)