On riscv newer glibc (2.41) will probe instruction support using the
riscv_hwprobe syscall. Since Valgrind currently doesn't have a wrapper
for riscv_hwprobe that causes a Warning. Since the RISC-V Hardware
Probing Interface is non-trivial and we don't really implement
extended riscv instructions anyway work around that by "implementing"
riscv_hwprobe as sys_ni_syscall so it generates an ENOSYS and glibc
will silently fall back to not using any extended instructions.
https://docs.kernel.org/arch/riscv/hwprobe.html
https://bugs.kde.org/show_bug.cgi?id=503253
(cherry picked from commit
5efdbbd321e6816ab2ae436d38c20bdcc72b4c17)
LINXY(__NR_perf_event_open, sys_perf_event_open), /* 241 */
LINXY(__NR_accept4, sys_accept4), /* 242 */
LINXY(__NR_recvmmsg, sys_recvmmsg), /* 243 */
+ GENX_(__NR_riscv_hwprobe, sys_ni_syscall), /* 258 */
PLAX_(__NR_riscv_flush_icache, sys_riscv_flush_icache), /* 259 */
GENXY(__NR_wait4, sys_wait4), /* 260 */
LINXY(__NR_prlimit64, sys_prlimit64), /* 261 */
#define __NR_mmap __NR3264_mmap
#define __NR_fadvise64 __NR3264_fadvise64
+#define __NR_riscv_hwprobe (__NR_arch_specific_syscall + 14)
#define __NR_riscv_flush_icache (__NR_arch_specific_syscall + 15)
#endif /* __VKI_SCNUMS_RISCV64_LINUX_H */