|
118 | 118 | # define MULTI_CACHE 1 |
119 | 119 | #endif |
120 | 120 |
|
| 121 | +#ifdef CONFIG_CPU_CACHE_NOP |
| 122 | +# define MULTI_CACHE 1 |
| 123 | +#endif |
| 124 | + |
121 | 125 | #if defined(CONFIG_CPU_V7M) |
122 | 126 | # define MULTI_CACHE 1 |
123 | 127 | #endif |
|
126 | 130 | #error Unknown cache maintenance model |
127 | 131 | #endif |
128 | 132 |
|
129 | | -#ifndef __ASSEMBLER__ |
130 | | -static inline void nop_flush_icache_all(void) { } |
131 | | -static inline void nop_flush_kern_cache_all(void) { } |
132 | | -static inline void nop_flush_kern_cache_louis(void) { } |
133 | | -static inline void nop_flush_user_cache_all(void) { } |
134 | | -static inline void nop_flush_user_cache_range(unsigned long a, |
135 | | - unsigned long b, unsigned int c) { } |
136 | | - |
137 | | -static inline void nop_coherent_kern_range(unsigned long a, unsigned long b) { } |
138 | | -static inline int nop_coherent_user_range(unsigned long a, |
139 | | - unsigned long b) { return 0; } |
140 | | -static inline void nop_flush_kern_dcache_area(void *a, size_t s) { } |
141 | | - |
142 | | -static inline void nop_dma_flush_range(const void *a, const void *b) { } |
143 | | - |
144 | | -static inline void nop_dma_map_area(const void *s, size_t l, int f) { } |
145 | | -static inline void nop_dma_unmap_area(const void *s, size_t l, int f) { } |
146 | | -#endif |
147 | | - |
148 | 133 | #ifndef MULTI_CACHE |
149 | 134 | #define __cpuc_flush_icache_all __glue(_CACHE,_flush_icache_all) |
150 | 135 | #define __cpuc_flush_kern_all __glue(_CACHE,_flush_kern_cache_all) |
| 136 | +/* This function only has a dedicated assembly callback on the v7 cache */ |
| 137 | +#ifdef CONFIG_CPU_CACHE_V7 |
151 | 138 | #define __cpuc_flush_kern_louis __glue(_CACHE,_flush_kern_cache_louis) |
| 139 | +#else |
| 140 | +#define __cpuc_flush_kern_louis __glue(_CACHE,_flush_kern_cache_all) |
| 141 | +#endif |
152 | 142 | #define __cpuc_flush_user_all __glue(_CACHE,_flush_user_cache_all) |
153 | 143 | #define __cpuc_flush_user_range __glue(_CACHE,_flush_user_cache_range) |
154 | 144 | #define __cpuc_coherent_kern_range __glue(_CACHE,_coherent_kern_range) |
|
0 commit comments