From: Philippe Mathieu-Daudé Date: Mon, 5 Jun 2023 14:05:56 +0000 (+0200) Subject: util/cacheflush: Use declarations from on Darwin X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=0baf54d0056979d6344b872a5b20acb6a5fd3cf8;p=qemu.git util/cacheflush: Use declarations from on Darwin Per the cache(3) man page, sys_icache_invalidate() and sys_dcache_flush() are declared in . Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20230605175647.88395-2-philmd@linaro.org> --- 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 + void flush_idcache_range(uintptr_t rx, uintptr_t rw, size_t len) { sys_dcache_flush((void *)rw, len);