Skip to content

Commit 5dadda5

Browse files
clementlegerpalmer-dabbelt
authored andcommitted
riscv: hwprobe: export Zvfh[min] ISA extensions
Export Zvfh[min] ISA extension[1] through hwprobe. Link: https://drive.google.com/file/d/1_Yt60HGAf1r1hx7JnsIptw0sqkBd9BQ8/view [1] 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 f4961b7 commit 5dadda5

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

Documentation/arch/riscv/hwprobe.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,14 @@ The following keys are defined:
149149
* :c:macro:`RISCV_HWPROBE_EXT_ZIHINTNTL`: The Zihintntl extension version 1.0
150150
is supported as defined in the RISC-V ISA manual.
151151

152+
* :c:macro:`RISCV_HWPROBE_EXT_ZVFH`: The Zvfh extension is supported as
153+
defined in the RISC-V Vector manual starting from commit e2ccd0548d6c
154+
("Remove draft warnings from Zvfh[min]").
155+
156+
* :c:macro:`RISCV_HWPROBE_EXT_ZVFHMIN`: The Zvfhmin extension is supported as
157+
defined in the RISC-V Vector manual starting from commit e2ccd0548d6c
158+
("Remove draft warnings from Zvfh[min]").
159+
152160
* :c:macro:`RISCV_HWPROBE_KEY_CPUPERF_0`: A bitmask that contains performance
153161
information about the selected set of processors.
154162

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ struct riscv_hwprobe {
5353
#define RISCV_HWPROBE_EXT_ZFH (1 << 27)
5454
#define RISCV_HWPROBE_EXT_ZFHMIN (1 << 28)
5555
#define RISCV_HWPROBE_EXT_ZIHINTNTL (1 << 29)
56+
#define RISCV_HWPROBE_EXT_ZVFH (1 << 30)
57+
#define RISCV_HWPROBE_EXT_ZVFHMIN (1 << 31)
5658
#define RISCV_HWPROBE_KEY_CPUPERF_0 5
5759
#define RISCV_HWPROBE_MISALIGNED_UNKNOWN (0 << 0)
5860
#define RISCV_HWPROBE_MISALIGNED_EMULATED (1 << 0)

arch/riscv/kernel/sys_riscv.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,8 @@ static void hwprobe_isa_ext0(struct riscv_hwprobe *pair,
186186
EXT_KEY(ZVKSED);
187187
EXT_KEY(ZVKSH);
188188
EXT_KEY(ZVKT);
189+
EXT_KEY(ZVFH);
190+
EXT_KEY(ZVFHMIN);
189191
}
190192

191193
if (has_fpu()) {

0 commit comments

Comments
 (0)