The libcrypto library constructor calls the riscv_hwprobe syscall through the syscall wrapper. Forward it to the __riscv_hwprobe function.
Signed-off-by: Andreas Schwab <sch...@suse.de> --- testsuite/init_module.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/testsuite/init_module.c b/testsuite/init_module.c index 8ff2699..3516c1d 100644 --- a/testsuite/init_module.c +++ b/testsuite/init_module.c @@ -26,6 +26,9 @@ #include <sys/syscall.h> #include <sys/types.h> #include <sys/utsname.h> +#ifdef __riscv +#include <sys/hwprobe.h> +#endif #include <shared/util.h> @@ -370,6 +373,24 @@ TS_EXPORT long int syscall(long int __sysno, ...) return nextlib_syscall(__NR_gettid); } +#ifdef __NR_riscv_hwprobe + if (__sysno == __NR_riscv_hwprobe) { + struct riscv_hwprobe *pairs; + size_t pair_count, cpusetsize; + unsigned long int *cpus; + unsigned int flags; + + va_start (ap, __sysno); + pairs = va_arg (ap, struct riscv_hwprobe *); + pair_count = va_arg (ap, size_t); + cpusetsize = va_arg (ap, size_t); + cpus = va_arg (ap, unsigned long int *); + flags = va_arg (ap, unsigned int); + + return __riscv_hwprobe (pairs, pair_count, cpusetsize, cpus, flags); + } +#endif + /* * FIXME: no way to call the libc function due since this is a * variadic argument function and we don't have a vsyscall() variant -- 2.50.0 -- Andreas Schwab, SUSE Labs, sch...@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."