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)
35extern void arch_dcache_enable(
void);
37#define cache_data_enable arch_dcache_enable
44extern void arch_dcache_disable(
void);
46#define cache_data_disable arch_dcache_disable
57extern int arch_dcache_flush_all(
void);
59#define cache_data_flush_all arch_dcache_flush_all
70extern int arch_dcache_invd_all(
void);
72#define cache_data_invd_all arch_dcache_invd_all
83extern int arch_dcache_flush_and_invd_all(
void);
85#define cache_data_flush_and_invd_all arch_dcache_flush_and_invd_all
106extern int arch_dcache_flush_range(
void *addr,
size_t size);
108#define cache_data_flush_range(addr, size) arch_dcache_flush_range(addr, size)
130extern int arch_dcache_invd_range(
void *addr,
size_t size);
132#define cache_data_invd_range(addr, size) arch_dcache_invd_range(addr, size)
155extern int arch_dcache_flush_and_invd_range(
void *addr,
size_t 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)
175extern size_t arch_dcache_line_size_get(
void);
177#define cache_data_line_size_get arch_dcache_line_size_get
183#if defined(CONFIG_ICACHE)
190extern void arch_icache_enable(
void);
192#define cache_instr_enable arch_icache_enable
199extern void arch_icache_disable(
void);
201#define cache_instr_disable arch_icache_disable
212extern int arch_icache_flush_all(
void);
214#define cache_instr_flush_all arch_icache_flush_all
225extern int arch_icache_invd_all(
void);
227#define cache_instr_invd_all arch_icache_invd_all
238extern int arch_icache_flush_and_invd_all(
void);
240#define cache_instr_flush_and_invd_all arch_icache_flush_and_invd_all
261extern int arch_icache_flush_range(
void *addr,
size_t size);
263#define cache_instr_flush_range(addr, size) arch_icache_flush_range(addr, size)
285extern int arch_icache_invd_range(
void *addr,
size_t size);
287#define cache_instr_invd_range(addr, size) arch_icache_invd_range(addr, size)
309extern int arch_icache_flush_and_invd_range(
void *addr,
size_t 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)
330extern size_t arch_icache_line_size_get(
void);
332#define cache_instr_line_size_get arch_icache_line_size_get