Skip to content

Commit fc078ea

Browse files
clementlegerpalmer-dabbelt
authored andcommitted
riscv: hwprobe: export Zcmop ISA extension
Export Zcmop ISA extension through hwprobe. Signed-off-by: Clément Léger <[email protected]> Reviewed-by: Evan Green <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent 164d644 commit fc078ea

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

Documentation/arch/riscv/hwprobe.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,10 @@ The following keys are defined:
231231
("Zcf doesn't exist on RV64 as it contains no instructions") of
232232
riscv-code-size-reduction.
233233

234+
* :c:macro:`RISCV_HWPROBE_EXT_ZCMOP`: The Zcmop May-Be-Operations extension is
235+
supported as defined in the RISC-V ISA manual starting from commit
236+
c732a4f39a4 ("Zcmop is ratified/1.0").
237+
234238
* :c:macro:`RISCV_HWPROBE_KEY_CPUPERF_0`: A bitmask that contains performance
235239
information about the selected set of processors.
236240

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ struct riscv_hwprobe {
7070
#define RISCV_HWPROBE_EXT_ZCB (1ULL << 44)
7171
#define RISCV_HWPROBE_EXT_ZCD (1ULL << 45)
7272
#define RISCV_HWPROBE_EXT_ZCF (1ULL << 46)
73+
#define RISCV_HWPROBE_EXT_ZCMOP (1ULL << 47)
7374
#define RISCV_HWPROBE_KEY_CPUPERF_0 5
7475
#define RISCV_HWPROBE_MISALIGNED_UNKNOWN (0 << 0)
7576
#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
@@ -115,6 +115,7 @@ static void hwprobe_isa_ext0(struct riscv_hwprobe *pair,
115115
EXT_KEY(ZIMOP);
116116
EXT_KEY(ZCA);
117117
EXT_KEY(ZCB);
118+
EXT_KEY(ZCMOP);
118119

119120
/*
120121
* All the following extensions must depend on the kernel

0 commit comments

Comments
 (0)