__riscv_flush_icache(3) Library Functions Manual __riscv_flush_icache(3)

__riscv_flush_icache - Flush icaches on RISC-V

Standard C library (libc-lc)

#include <sys/cachectl.h>
int __riscv_flush_icache(void *start, void *end, unsigned long flags);

__riscv_flush_icache() enforces ordering between stores and instruction cache fetches.

The range of addresses over which ordering is enforced is specified by start and end.

The flags argument controls the extent of this ordering, with the default behavior (a flags value of 0) being to enforce the fence on all threads in the current process. Setting the SYS_RISCV_FLUSH_ICACHE_LOCAL bit allows users to indicate that enforcing ordering on only the current thread is necessary. All other flag bits are reserved.

Linux on RISC-V.

Linux 4.15. glibc 2.27.

syscall(2)

2024-07-23 Linux man-pages 6.10