linux-user/riscv: Fix definition of RISCV_HWPROBE_EXT_ZVFHMIN
PATCH 1/1 linux-user/riscv: Fix definition of RISCV_HWPROBE_EXT_ZVFHMIN
Current definition yields a negative 32bits value, messing up hwprobe result when Zvfhmin extension presents. Replace it by using a 1ULL bit shift value as done in kernel upstream.
Fixes a3432cf227 ("linux-user/riscv: Sync hwprobe keys with Linux")
Signed-off-by Yao Zi <[email protected]>
--- linux-user/syscall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
linux-user/syscall.c +1 -1
@@ -8943,7 +8943,7 @@ static int do_getdents64(abi_long dirfd, abi_long arg2, abi_long count)#define RISCV_HWPROBE_EXT_ZFHMIN (1 << 28)#define RISCV_HWPROBE_EXT_ZIHINTNTL (1 << 29)#define RISCV_HWPROBE_EXT_ZVFH (1 << 30) -#define RISCV_HWPROBE_EXT_ZVFHMIN (1 << 31) +#define RISCV_HWPROBE_EXT_ZVFHMIN (1ULL << 31)#define RISCV_HWPROBE_EXT_ZFA (1ULL << 32)#define RISCV_HWPROBE_EXT_ZTSO (1ULL << 33)#define RISCV_HWPROBE_EXT_ZACAS (1ULL << 34)
Signature · 1 line
2.46.2
Quoted 17 lines · Yao Zi
Current definition yields a negative 32bits value, messing up hwprobe result when Zvfhmin extension presents. Replace it by using a 1ULL bit shift value as done in kernel upstream.
Fixes a3432cf227 ("linux-user/riscv: Sync hwprobe keys with Linux")Signed-off-by Yao Zi <[email protected]>--- linux-user/syscall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)linux-user/syscall.c +0
-0
linux-user/syscall.c static int do_getdents64(abi_long dirfd, abi_long arg2, abi_long count) · line 8949
Quoted 8 lines
linux-user/syscall.c +1
-1@@ -8943,7 +8943,7 @@ static int do_getdents64(abi_long dirfd, abi_long arg2, abi_long count)#define RISCV_HWPROBE_EXT_ZFHMIN (1 << 28)#define RISCV_HWPROBE_EXT_ZIHINTNTL (1 << 29)#define RISCV_HWPROBE_EXT_ZVFH (1 << 30) -#define RISCV_HWPROBE_EXT_ZVFHMIN (1 << 31) +#define RISCV_HWPROBE_EXT_ZVFHMIN (1ULL << 31)#define RISCV_HWPROBE_EXT_ZFA (1ULL << 32)#define RISCV_HWPROBE_EXT_ZTSO (1ULL << 33)#define RISCV_HWPROBE_EXT_ZACAS (1ULL << 34)
Reviewed-by Richard Henderson <[email protected]>
Queued, thanks.
r~