12#ifndef ZEPHYR_INCLUDE_ARCH_CACHE_H_
13#define ZEPHYR_INCLUDE_ARCH_CACHE_H_
22#if defined(CONFIG_ARM64)
24#elif defined(CONFIG_XTENSA)
28#if defined(CONFIG_DCACHE) || defined(__DOXYGEN__)
37#define cache_data_enable arch_dcache_enable
46#define cache_data_disable arch_dcache_disable
59#define cache_data_flush_all arch_dcache_flush_all
72#define cache_data_invd_all arch_dcache_invd_all
85#define cache_data_flush_and_invd_all arch_dcache_flush_and_invd_all
108#define cache_data_flush_range(addr, size) arch_dcache_flush_range(addr, size)
132#define cache_data_invd_range(addr, size) arch_dcache_invd_range(addr, size)
157#define cache_data_flush_and_invd_range(addr, size) \
158 arch_dcache_flush_and_invd_range(addr, size)
160#if defined(CONFIG_DCACHE_LINE_SIZE_DETECT) || defined(__DOXYGEN__)
177#define cache_data_line_size_get arch_dcache_line_size_get
183#if defined(CONFIG_ICACHE) || defined(__DOXYGEN__)
192#define cache_instr_enable arch_icache_enable
201#define cache_instr_disable arch_icache_disable
214#define cache_instr_flush_all arch_icache_flush_all
227#define cache_instr_invd_all arch_icache_invd_all
240#define cache_instr_flush_and_invd_all arch_icache_flush_and_invd_all
263#define cache_instr_flush_range(addr, size) arch_icache_flush_range(addr, size)
287#define cache_instr_invd_range(addr, size) arch_icache_invd_range(addr, size)
311#define cache_instr_flush_and_invd_range(addr, size) \
312 arch_icache_flush_and_invd_range(addr, size)
314#if defined(CONFIG_ICACHE_LINE_SIZE_DETECT) || defined(__DOXYGEN__)
332#define cache_instr_line_size_get arch_icache_line_size_get
338#if CONFIG_CACHE_DOUBLEMAP || __DOXYGEN__
340#define cache_is_ptr_cached(ptr) arch_cache_is_ptr_cached(ptr)
343#define cache_is_ptr_uncached(ptr) arch_cache_is_ptr_uncached(ptr)
346#define cache_cached_ptr(ptr) arch_cache_cached_ptr_get(ptr)
349#define cache_uncached_ptr(ptr) arch_cache_uncached_ptr_get(ptr)
static ALWAYS_INLINE void arch_cache_init(void)
Definition cache.h:239
void arch_dcache_disable(void)
Disable the d-cache.
void arch_icache_disable(void)
Disable the i-cache.
void * arch_cache_uncached_ptr_get(void *ptr)
int arch_dcache_invd_range(void *addr, size_t size)
Invalidate an address range in the d-cache.
int arch_icache_flush_and_invd_all(void)
Flush and Invalidate the i-cache.
int arch_icache_flush_all(void)
Flush the i-cache.
int arch_icache_invd_all(void)
Invalidate the i-cache.
int arch_dcache_flush_range(void *addr, size_t size)
Flush an address range in the d-cache.
size_t arch_dcache_line_size_get(void)
Get the d-cache line size.
size_t arch_icache_line_size_get(void)
Get the i-cache line size.
int arch_icache_flush_range(void *addr, size_t size)
Flush an address range in the i-cache.
int arch_icache_invd_range(void *addr, size_t size)
Invalidate an address range in the i-cache.
int arch_dcache_flush_all(void)
Flush the d-cache.
bool arch_cache_is_ptr_cached(void *ptr)
int arch_icache_flush_and_invd_range(void *addr, size_t size)
Flush and Invalidate an address range in the i-cache.
bool arch_cache_is_ptr_uncached(void *ptr)
void * arch_cache_cached_ptr_get(void *ptr)
int arch_dcache_flush_and_invd_all(void)
Flush and Invalidate the d-cache.
int arch_dcache_invd_all(void)
Invalidate the d-cache.
void arch_icache_enable(void)
Enable the i-cache.
int arch_dcache_flush_and_invd_range(void *addr, size_t size)
Flush and Invalidate an address range in the d-cache.
void arch_dcache_enable(void)
Enable the d-cache.