]> git.dujemihanovic.xyz Git - linux.git/commit
riscv: hwprobe: fix invalid sign extension for RISCV_HWPROBE_EXT_ZVFHMIN
authorClément Léger <cleger@rivosinc.com>
Tue, 9 Apr 2024 14:38:37 +0000 (16:38 +0200)
committerPalmer Dabbelt <palmer@rivosinc.com>
Tue, 23 Apr 2024 14:06:44 +0000 (07:06 -0700)
commit5ea6764d9095e234b024054f75ebbccc4f0eb146
tree7df6f6e8ca12a8271aa4560b9d44f2dc350f3482
parenta373a36fb6b024ac1d87fc04c97c75621b574c30
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: 5dadda5e6a59 ("riscv: hwprobe: export Zvfh[min] ISA extensions")
Signed-off-by: Clément Léger <cleger@rivosinc.com>
Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Link: https://lore.kernel.org/r/20240409143839.558784-1-cleger@rivosinc.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
arch/riscv/include/uapi/asm/hwprobe.h