Skip to content

Commit 3359866

Browse files
clementlegerpalmer-dabbelt
authored andcommitted
riscv: hwprobe: export Zicond extension
Export the zicond extension to userspace using hwprobe. Signed-off-by: Clément Léger <cleger@rivosinc.com> Link: https://lore.kernel.org/r/20231220155723.684081-7-cleger@rivosinc.com Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
1 parent 154a370 commit 3359866

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

Documentation/arch/riscv/hwprobe.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,11 @@ The following keys are defined:
169169
defined in the Atomic Compare-and-Swap (CAS) instructions manual starting
170170
from commit 5059e0ca641c ("update to ratified").
171171

172+
* :c:macro:`RISCV_HWPROBE_EXT_ZICOND`: The Zicond extension is supported as
173+
defined in the RISC-V Integer Conditional (Zicond) operations extension
174+
manual starting from commit 95cf1f9 ("Add changes requested by Ved
175+
during signoff")
176+
172177
* :c:macro:`RISCV_HWPROBE_KEY_CPUPERF_0`: A bitmask that contains performance
173178
information about the selected set of processors.
174179

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ struct riscv_hwprobe {
5858
#define RISCV_HWPROBE_EXT_ZFA (1ULL << 32)
5959
#define RISCV_HWPROBE_EXT_ZTSO (1ULL << 33)
6060
#define RISCV_HWPROBE_EXT_ZACAS (1ULL << 34)
61+
#define RISCV_HWPROBE_EXT_ZICOND (1ULL << 35)
6162
#define RISCV_HWPROBE_KEY_CPUPERF_0 5
6263
#define RISCV_HWPROBE_MISALIGNED_UNKNOWN (0 << 0)
6364
#define RISCV_HWPROBE_MISALIGNED_EMULATED (1 << 0)

arch/riscv/kernel/sys_riscv.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ static void hwprobe_isa_ext0(struct riscv_hwprobe *pair,
176176
EXT_KEY(ZIHINTNTL);
177177
EXT_KEY(ZTSO);
178178
EXT_KEY(ZACAS);
179+
EXT_KEY(ZICOND);
179180

180181
if (has_vector()) {
181182
EXT_KEY(ZVBB);

0 commit comments

Comments
 (0)