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>
12 #include <asm/hardware.h>
14 #include "proc-macros.S"
17 * flush_user_cache_all()
19 * Invalidate all cache entries in a particular address
22 * - mm - mm_struct describing address space
24 ENTRY(v4_flush_user_cache_all)
27 * flush_kern_cache_all()
29 * Clean and invalidate the entire cache.
31 ENTRY(v4_flush_kern_cache_all)
34 mcr p15, 0, r0, c7, c7, 0 @ flush ID cache
41 * flush_user_cache_range(start, end, flags)
43 * Invalidate a range of cache entries in the specified
46 * - start - start address (may not be aligned)
47 * - end - end address (exclusive, may not be aligned)
48 * - flags - vma_area_struct flags describing address space
50 ENTRY(v4_flush_user_cache_range)
53 mcreq p15, 0, ip, c7, c7, 0 @ flush ID cache
60 * coherent_kern_range(start, end)
62 * Ensure coherency between the Icache and the Dcache in the
63 * region described by start. If you have non-snooping
64 * Harvard caches, you need to implement this function.
66 * - start - virtual start address
67 * - end - virtual end address
69 ENTRY(v4_coherent_kern_range)
73 * coherent_user_range(start, end)
75 * Ensure coherency between the Icache and the Dcache in the
76 * region described by start. If you have non-snooping
77 * Harvard caches, you need to implement this function.
79 * - start - virtual start address
80 * - end - virtual end address
82 ENTRY(v4_coherent_user_range)
86 * flush_kern_dcache_page(void *page)
88 * Ensure no D cache aliasing occurs, either with itself or
91 * - addr - page aligned address
93 ENTRY(v4_flush_kern_dcache_page)
97 * dma_inv_range(start, end)
99 * Invalidate (discard) the specified virtual address range.
100 * May not write back any entries. If 'start' or 'end'
101 * are not cache line aligned, those lines must be written
104 * - start - virtual start address
105 * - end - virtual end address
107 ENTRY(v4_dma_inv_range)
111 * dma_flush_range(start, end)
113 * Clean and invalidate the specified virtual address range.
115 * - start - virtual start address
116 * - end - virtual end address
118 ENTRY(v4_dma_flush_range)
121 mcr p15, 0, r0, c7, c7, 0 @ flush ID cache
126 * dma_clean_range(start, end)
128 * Clean (write back) the specified virtual address range.
130 * - start - virtual start address
131 * - end - virtual end address
133 ENTRY(v4_dma_clean_range)
138 .type v4_cache_fns, #object
140 .long v4_flush_kern_cache_all
141 .long v4_flush_user_cache_all
142 .long v4_flush_user_cache_range
143 .long v4_coherent_kern_range
144 .long v4_coherent_user_range
145 .long v4_flush_kern_dcache_page
146 .long v4_dma_inv_range
147 .long v4_dma_clean_range
148 .long v4_dma_flush_range
149 .size v4_cache_fns, . - v4_cache_fns