From 9d563e8f74b87121f4dd3bbb75e5fcaf63aa80dc Mon Sep 17 00:00:00 2001 From: Carlo Caione Date: Wed, 2 Dec 2020 21:42:42 +0100 Subject: [PATCH] cache: libmetal: Redirect sys_cache_flush() Libmetal is still using the old sys_cache_flush(). Use an helper until libmetal is properly fixed. Signed-off-by: Carlo Caione --- include/cache.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/cache.h b/include/cache.h index 262cae2a8ea..4478c81a440 100644 --- a/include/cache.h +++ b/include/cache.h @@ -168,6 +168,13 @@ static inline int z_impl_sys_icache_range(void *addr, size_t size, int op) return -ENOTSUP; } +#ifdef CONFIG_LIBMETAL +static inline void sys_cache_flush(void *addr, size_t size) +{ + sys_dcache_range(addr, size, K_CACHE_WB); +} +#endif + #define CPU DT_PATH(cpus, cpu_0) /**