Lines Matching +full:2 +full:- +full:way
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * linux/arch/arm/mm/cache-v7m.S
5 * Based on linux/arch/arm/mm/cache-v7.S
19 #include "proc-macros.S"
48 * dcisw: Invalidate data cache by set/way
55 * dccisw: Clean and invalidate data cache by set/way
129 and r3, r1, r0, lsr #3 @ NumWays - 1
137 1: sub r2, r2, #1 @ NumSets--
139 2: subs r3, r3, #1 @ Temp--
144 bgt 2b
155 * Flush the whole I-cache.
158 * r0 - set to 0
168 * Flush the whole D-cache.
170 * Corrupted registers: r0-r7, r9-r11
176 ands r3, r3, #7 << 1 @ extract LoC*2 from clidr
184 cmp r1, #2 @ see what cache we have at this level
185 blt skip @ skip if no cache, or just i-cache
198 ands r4, r4, r1, lsr #3 @ find maximum number on the way size
199 clz r5, r4 @ find bit position of way size increment
206 orr r11, r10, r6 @ factor way and cache number into r11
209 dccisw r11, r6 @ clean/invalidate by set/way
212 subs r4, r4, #1 @ decrement the way
215 add r10, r10, #2 @ increment cache number
231 * working outwards from L1 cache. This is done using Set/Way based cache
238 stmfd sp!, {r4-r7, r9-r11, lr}
241 ldmfd sp!, {r4-r7, r9-r11, lr}
250 * - mm - mm_struct describing address space
260 * - start - start address (may not be aligned)
261 * - end - end address (exclusive, may not be aligned)
262 * - flags - vm_area_struct flags describing address space
265 * - we have a VIPT cache.
279 * - start - virtual start address of region
280 * - end - virtual end address of region
283 * - the Icache does not read data from the write buffer
295 * - start - virtual start address of region
296 * - end - virtual end address of region
299 * - the Icache does not read data from the write buffer
319 2:
323 blo 2b
338 * - addr - kernel address
339 * - size - region size
362 * - start - virtual start address of region
363 * - end - virtual end address of region
388 * - start - virtual start address of region
389 * - end - virtual end address of region
406 * - start - virtual start address of region
407 * - end - virtual end address of region
424 * - start - kernel virtual start address
425 * - size - size of region
426 * - dir - DMA direction
437 * - start - kernel virtual start address
438 * - size - size of region
439 * - dir - DMA direction
453 @ define struct cpu_cache_fns (see <asm/cacheflush.h> and proc-macros.S)