From 2c887f24da36fa30eccd72e50d91222828fa526e Mon Sep 17 00:00:00 2001 From: Stefan O'Rear Date: Thu, 3 Sep 2020 05:23:40 -0400 Subject: riscv: fall back to syscall __riscv_flush_icache Matches glibc behavior and fixes a case where we could fall off the function without returning a value. --- src/linux/cache.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/linux/cache.c b/src/linux/cache.c index 45024309..e76f7812 100644 --- a/src/linux/cache.c +++ b/src/linux/cache.c @@ -45,6 +45,7 @@ int __riscv_flush_icache(void *start, void *end, unsigned long int flags) if (!r) return r; if (r != -ENOSYS) return __syscall_ret(r); } + return syscall(SYS_riscv_flush_icache, start, end, flags); } weak_alias(__riscv_flush_icache, riscv_flush_icache); #endif -- cgit 1.4.1