Skip to content

Commit 5ea6764

Browse files
clementlegerpalmer-dabbelt
authored andcommitted
riscv: hwprobe: fix invalid sign extension for RISCV_HWPROBE_EXT_ZVFHMIN
The current definition yields a negative 32bits signed value which result in a mask with is obviously incorrect. Replace it by using a 1ULL bit shift value to obtain a single set bit mask. Fixes: 5dadda5 ("riscv: hwprobe: export Zvfh[min] ISA extensions") Signed-off-by: Clément Léger <[email protected]> Reviewed-by: Alexandre Ghiti <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent a373a36 commit 5ea6764

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ struct riscv_hwprobe {
5454
#define RISCV_HWPROBE_EXT_ZFHMIN (1 << 28)
5555
#define RISCV_HWPROBE_EXT_ZIHINTNTL (1 << 29)
5656
#define RISCV_HWPROBE_EXT_ZVFH (1 << 30)
57-
#define RISCV_HWPROBE_EXT_ZVFHMIN (1 << 31)
57+
#define RISCV_HWPROBE_EXT_ZVFHMIN (1ULL << 31)
5858
#define RISCV_HWPROBE_EXT_ZFA (1ULL << 32)
5959
#define RISCV_HWPROBE_EXT_ZTSO (1ULL << 33)
6060
#define RISCV_HWPROBE_EXT_ZACAS (1ULL << 34)

0 commit comments

Comments
 (0)