Using recent compilers we get the following error message:
../pk/pk.c: In function 'run_loaded_program.constprop':
../pk/pk.c:177:3: error: both arguments to 'builtin___clear_cache'
must be pointers
177 | clear_cache(0, 0);
| ^~~~~~~
Let's use the existing function __riscv_flush_icache(),
give it a header with a prototype and use it to
emits the FENCE.I instruction directly.
Using recent compilers we get the following error message:
../pk/pk.c: In function 'run_loaded_program.constprop': ../pk/pk.c:177:3: error: both arguments to 'builtin___clear_cache' must be pointers 177 | clear_cache(0, 0); | ^
~~~~~~Let's use the existing function __riscv_flush_icache(), give it a header with a prototype and use it to emits the FENCE.I instruction directly.
See #239
Suggested-by: Andrew Waterman andrew@sifive.com Signed-off-by: Christoph Muellner cmuellner@linux.com