2 * linux/arch/arm/mm/cache-v3.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 <mach/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(v3_flush_user_cache_all)
27 * flush_kern_cache_all()
29 * Clean and invalidate the entire cache.
31 ENTRY(v3_flush_kern_cache_all)
35 * flush_user_cache_range(start, end, flags)
37 * Invalidate a range of cache entries in the specified
40 * - start - start address (may not be aligned)
41 * - end - end address (exclusive, may not be aligned)
42 * - flags - vma_area_struct flags describing address space
44 ENTRY(v3_flush_user_cache_range)
46 mcreq p15, 0, ip, c7, c0, 0 @ flush ID cache
50 * coherent_kern_range(start, end)
52 * Ensure coherency between the Icache and the Dcache in the
53 * region described by start. If you have non-snooping
54 * Harvard caches, you need to implement this function.
56 * - start - virtual start address
57 * - end - virtual end address
59 ENTRY(v3_coherent_kern_range)
63 * coherent_user_range(start, end)
65 * Ensure coherency between the Icache and the Dcache in the
66 * region described by start. If you have non-snooping
67 * Harvard caches, you need to implement this function.
69 * - start - virtual start address
70 * - end - virtual end address
72 ENTRY(v3_coherent_user_range)
76 * flush_kern_dcache_page(void *page)
78 * Ensure no D cache aliasing occurs, either with itself or
81 * - addr - page aligned address
83 ENTRY(v3_flush_kern_dcache_page)
87 * dma_inv_range(start, end)
89 * Invalidate (discard) the specified virtual address range.
90 * May not write back any entries. If 'start' or 'end'
91 * are not cache line aligned, those lines must be written
94 * - start - virtual start address
95 * - end - virtual end address
97 ENTRY(v3_dma_inv_range)
101 * dma_flush_range(start, end)
103 * Clean and invalidate the specified virtual address range.
105 * - start - virtual start address
106 * - end - virtual end address
108 ENTRY(v3_dma_flush_range)
110 mcr p15, 0, r0, c7, c0, 0 @ flush ID cache
114 * dma_clean_range(start, end)
116 * Clean (write back) the specified virtual address range.
118 * - start - virtual start address
119 * - end - virtual end address
121 ENTRY(v3_dma_clean_range)
126 .type v3_cache_fns, #object
128 .long v3_flush_kern_cache_all
129 .long v3_flush_user_cache_all
130 .long v3_flush_user_cache_range
131 .long v3_coherent_kern_range
132 .long v3_coherent_user_range
133 .long v3_flush_kern_dcache_page
134 .long v3_dma_inv_range
135 .long v3_dma_clean_range
136 .long v3_dma_flush_range
137 .size v3_cache_fns, . - v3_cache_fns