2 * linux/arch/arm/mm/cache-v4.S
4 * Copyright (C) 1997-2002 Russell king
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
10 #include <linux/linkage.h>
11 #include <linux/init.h>
13 #include "proc-macros.S"
18 * Unconditionally clean and invalidate the entire icache.
20 ENTRY(v4_flush_icache_all)
22 ENDPROC(v4_flush_icache_all)
25 * flush_user_cache_all()
27 * Invalidate all cache entries in a particular address
30 * - mm - mm_struct describing address space
32 ENTRY(v4_flush_user_cache_all)
35 * flush_kern_cache_all()
37 * Clean and invalidate the entire cache.
39 ENTRY(v4_flush_kern_cache_all)
40 #ifdef CONFIG_CPU_CP15
42 mcr p15, 0, r0, c7, c7, 0 @ flush ID cache
49 * flush_user_cache_range(start, end, flags)
51 * Invalidate a range of cache entries in the specified
54 * - start - start address (may not be aligned)
55 * - end - end address (exclusive, may not be aligned)
56 * - flags - vma_area_struct flags describing address space
58 ENTRY(v4_flush_user_cache_range)
59 #ifdef CONFIG_CPU_CP15
61 mcreq p15, 0, ip, c7, c7, 0 @ flush ID cache
68 * coherent_kern_range(start, end)
70 * Ensure coherency between the Icache and the Dcache in the
71 * region described by start. If you have non-snooping
72 * Harvard caches, you need to implement this function.
74 * - start - virtual start address
75 * - end - virtual end address
77 ENTRY(v4_coherent_kern_range)
81 * coherent_user_range(start, end)
83 * Ensure coherency between the Icache and the Dcache in the
84 * region described by start. If you have non-snooping
85 * Harvard caches, you need to implement this function.
87 * - start - virtual start address
88 * - end - virtual end address
90 ENTRY(v4_coherent_user_range)
94 * flush_kern_dcache_area(void *addr, size_t size)
96 * Ensure no D cache aliasing occurs, either with itself or
99 * - addr - kernel address
100 * - size - region size
102 ENTRY(v4_flush_kern_dcache_area)
106 * dma_flush_range(start, end)
108 * Clean and invalidate the specified virtual address range.
110 * - start - virtual start address
111 * - end - virtual end address
113 ENTRY(v4_dma_flush_range)
114 #ifdef CONFIG_CPU_CP15
116 mcr p15, 0, r0, c7, c7, 0 @ flush ID cache
121 * dma_unmap_area(start, size, dir)
122 * - start - kernel virtual start address
123 * - size - size of region
124 * - dir - DMA direction
126 ENTRY(v4_dma_unmap_area)
127 teq r2, #DMA_TO_DEVICE
128 bne v4_dma_flush_range
132 * dma_map_area(start, size, dir)
133 * - start - kernel virtual start address
134 * - size - size of region
135 * - dir - DMA direction
137 ENTRY(v4_dma_map_area)
139 ENDPROC(v4_dma_unmap_area)
140 ENDPROC(v4_dma_map_area)
144 @ define struct cpu_cache_fns (see <asm/cacheflush.h> and proc-macros.S)
145 define_cache_functions v4