Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

riscv/hwprobe: add zicfilp / zicfiss enumeration in hwprobe

Add enumeration of the zicfilp and zicfiss extensions in the hwprobe syscall.

Reviewed-by: Zong Li <zong.li@sifive.com>
Signed-off-by: Deepak Gupta <debug@rivosinc.com>
Tested-by: Andreas Korb <andreas.korb@aisec.fraunhofer.de> # QEMU, custom CVA6
Tested-by: Valentin Haudiquet <valentin.haudiquet@canonical.com>
Link: https://patch.msgid.link/20251112-v5_user_cfi_series-v23-20-b55691eacf4f@rivosinc.com
[pjw@kernel.org: updated to apply; extend into RISCV_HWPROBE_KEY_IMA_EXT_1; clean patch description]
Signed-off-by: Paul Walmsley <pjw@kernel.org>

authored by

Deepak Gupta and committed by
Paul Walmsley
30c30990 462a94fb

+6 -2
+3
arch/riscv/include/uapi/asm/hwprobe.h
··· 86 86 #define RISCV_HWPROBE_EXT_ZICBOP (1ULL << 60) 87 87 #define RISCV_HWPROBE_EXT_ZILSD (1ULL << 61) 88 88 #define RISCV_HWPROBE_EXT_ZCLSD (1ULL << 62) 89 + #define RISCV_HWPROBE_EXT_ZICFILP (1ULL << 63) 89 90 90 91 #define RISCV_HWPROBE_KEY_CPUPERF_0 5 91 92 #define RISCV_HWPROBE_MISALIGNED_UNKNOWN (0 << 0) ··· 115 114 #define RISCV_HWPROBE_KEY_VENDOR_EXT_MIPS_0 14 116 115 #define RISCV_HWPROBE_KEY_ZICBOP_BLOCK_SIZE 15 117 116 #define RISCV_HWPROBE_KEY_IMA_EXT_1 16 117 + #define RISCV_HWPROBE_EXT_ZICFISS (1ULL << 0) 118 + 118 119 /* Increase RISCV_HWPROBE_MAX_KEY when adding items. */ 119 120 120 121 /* Flags */
+3 -2
arch/riscv/kernel/sys_hwprobe.c
··· 126 126 EXT_KEY(isainfo->isa, ZICBOM, pair->value, missing); 127 127 EXT_KEY(isainfo->isa, ZICBOP, pair->value, missing); 128 128 EXT_KEY(isainfo->isa, ZICBOZ, pair->value, missing); 129 + EXT_KEY(isainfo->isa, ZICFILP, pair->value, missing); 129 130 EXT_KEY(isainfo->isa, ZICNTR, pair->value, missing); 130 131 EXT_KEY(isainfo->isa, ZICOND, pair->value, missing); 131 132 EXT_KEY(isainfo->isa, ZIHINTNTL, pair->value, missing); ··· 196 195 * doesn't have. 197 196 */ 198 197 for_each_cpu(cpu, cpus) { 199 - /* struct riscv_isainfo *isainfo = &hart_isa[cpu]; */ 198 + struct riscv_isainfo *isainfo = &hart_isa[cpu]; 200 199 201 200 /* 202 201 * Only use EXT_KEY() for extensions which can be ··· 204 203 * configuration, as no other checks, besides presence 205 204 * in the hart_isa bitmap, are made. 206 205 */ 207 - /* Nothing here yet */ 206 + EXT_KEY(isainfo->isa, ZICFISS, pair->value, missing); 208 207 } 209 208 210 209 /* Now turn off reporting features if any CPU is missing it. */