diff options
| author | Philippe Mathieu-Daudé <philmd@linaro.org> | 2023-06-05 16:05:56 +0200 |
|---|---|---|
| committer | Philippe Mathieu-Daudé <philmd@linaro.org> | 2023-06-13 11:28:58 +0200 |
| commit | 0baf54d0056979d6344b872a5b20acb6a5fd3cf8 (patch) | |
| tree | fd7cf396d138c3ca547d3f2f59dad4df5caf3f59 /util/cacheflush.c | |
| parent | f975033d56dbf945ca7a4247c301c217fa4972f8 (diff) | |
| download | focaccia-qemu-0baf54d0056979d6344b872a5b20acb6a5fd3cf8.tar.gz focaccia-qemu-0baf54d0056979d6344b872a5b20acb6a5fd3cf8.zip | |
util/cacheflush: Use declarations from <OSCacheControl.h> on Darwin
Per the cache(3) man page, sys_icache_invalidate() and sys_dcache_flush() are declared in <libkern/OSCacheControl.h>. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20230605175647.88395-2-philmd@linaro.org>
Diffstat (limited to 'util/cacheflush.c')
| -rw-r--r-- | util/cacheflush.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/util/cacheflush.c b/util/cacheflush.c index 06c2333a60..de35616718 100644 --- a/util/cacheflush.c +++ b/util/cacheflush.c @@ -237,8 +237,8 @@ static void __attribute__((constructor)) init_cache_info(void) #ifdef CONFIG_DARWIN /* Apple does not expose CTR_EL0, so we must use system interfaces. */ -extern void sys_icache_invalidate(void *start, size_t len); -extern void sys_dcache_flush(void *start, size_t len); +#include <libkern/OSCacheControl.h> + void flush_idcache_range(uintptr_t rx, uintptr_t rw, size_t len) { sys_dcache_flush((void *)rw, len); |