0008-riscv-Fall-back-to-syscall-__riscv_flush_icache.patch 822 B

1234567891011121314151617181920212223242526
  1. From ce443fcf9332f9bda0eeed4cf50174bae3732417 Mon Sep 17 00:00:00 2001
  2. From: Stefan O'Rear <sorear@fastmail.com>
  3. Date: Thu, 3 Sep 2020 05:23:40 -0400
  4. Subject: [PATCH 08/15] riscv: Fall back to syscall __riscv_flush_icache
  5. Matches glibc behavior and fixes a case where we could fall off the
  6. function without returning a value.
  7. ---
  8. src/linux/cache.c | 1 +
  9. 1 file changed, 1 insertion(+)
  10. diff --git a/src/linux/cache.c b/src/linux/cache.c
  11. index 0eb051c2..9cacac2b 100644
  12. --- a/src/linux/cache.c
  13. +++ b/src/linux/cache.c
  14. @@ -45,6 +45,7 @@ int __riscv_flush_icache(void *start, void *end, unsigned long int flags)
  15. if (!r) return r;
  16. if (r != -ENOSYS) return __syscall_ret(r);
  17. }
  18. + return syscall(SYS_riscv_flush_icache, start, end, flags);
  19. }
  20. weak_alias(__riscv_flush_icache, riscv_flush_icache);
  21. #endif
  22. --
  23. 2.28.0