From b2f8b8c1918b4523ee45dfc3f13a609fa18c0696 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Tue, 22 Apr 2025 16:15:50 +0200 Subject: riscv: user: Update constants for Zicntr and Zihpm MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A patch from me has finally been merged into the Linux Kernel, and the values for these constants have been increased by one due to the inclusion of another patch. Moreover, the Zicsr and Zifencei extensions have not been exported yet, but they might not make sense to include them after all. Signed-off-by: Miquel Sabaté Solà --- arch/riscv/user/hwprobe/probe.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) (limited to 'arch/riscv/user') diff --git a/arch/riscv/user/hwprobe/probe.c b/arch/riscv/user/hwprobe/probe.c index 9e2e978..de2c209 100644 --- a/arch/riscv/user/hwprobe/probe.c +++ b/arch/riscv/user/hwprobe/probe.c @@ -10,11 +10,10 @@ #define NR_RISCV_HWPROBE 258 -// Depend on Linux patches that have not been merged upstream... -#define RISCV_HWPROBE_EXT_ZICNTR (1ULL << 49) -#define RISCV_HWPROBE_EXT_ZIHPM (1ULL << 50) -#define RISCV_HWPROBE_EXT_ZICSR (1ULL << 51) -#define RISCV_HWPROBE_EXT_ZIFENCEI (1ULL << 52) +// Merged in Linux v6.15. +// See 4458b8f68dc7 ("riscv: hwprobe: export Zicntr and Zihpm extensions"). +#define RISCV_HWPROBE_EXT_ZICNTR (1ULL << 50) +#define RISCV_HWPROBE_EXT_ZIHPM (1ULL << 51) #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof(arr)[0]) @@ -228,14 +227,6 @@ static struct ext_pair_t ext_pairs[] = { .id = "ZIHPM", .value = RISCV_HWPROBE_EXT_ZIHPM, }, - { - .id = "ZICSR", - .value = RISCV_HWPROBE_EXT_ZICSR, - }, - { - .id = "ZIFENCEI", - .value = RISCV_HWPROBE_EXT_ZIFENCEI, - }, }; void print_bits(size_t size, void *ptr) -- cgit v1.2.3