From 3e6bd3fd86883b448fc250d96cde9d37f9efa879 Mon Sep 17 00:00:00 2001 From: Stefan O'Rear Date: Thu, 3 Sep 2020 05:23:40 -0400 Subject: [PATCH 08/14] 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 0eb051c2..9cacac2b 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 -- 2.25.4