From cdef7da956344b9423f6a094903cd0add98f31cf Mon Sep 17 00:00:00 2001 From: chao an Date: Wed, 18 Dec 2024 18:04:29 +0800 Subject: [PATCH] arm64/cache: add i/dcache check to avoid build break arch/arm64/src/common/arm64_cache.c:344:35: error: macro "up_get_icache_linesize" passed 1 arguments, but takes just 0 344 | size_t up_get_icache_linesize(void) | ^ Feishu-Id: 4956395133 Signed-off-by: chao an --- arch/arm64/src/common/arm64_cache.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm64/src/common/arm64_cache.c b/arch/arm64/src/common/arm64_cache.c index 6b1a05d577..86ecf85363 100644 --- a/arch/arm64/src/common/arm64_cache.c +++ b/arch/arm64/src/common/arm64_cache.c @@ -329,6 +329,8 @@ static inline int arm64_dcache_all(int op) * Public Functions ****************************************************************************/ +#ifdef CONFIG_ARCH_ICACHE + /**************************************************************************** * Name: up_get_icache_linesize * @@ -478,6 +480,10 @@ void up_disable_icache(void) ARM64_ISB(); } +#endif /* CONFIG_ARCH_ICACHE */ + +#ifdef CONFIG_ARCH_DCACHE + /**************************************************************************** * Name: up_invalidate_dcache * @@ -765,3 +771,5 @@ void up_coherent_dcache(uintptr_t addr, size_t len) up_invalidate_icache_all(); } } + +#endif /* CONFIG_ARCH_DCACHE */