aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mn10300/include
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2010-10-27 12:28:46 -0400
committerDavid Howells <dhowells@redhat.com>2010-10-27 12:28:46 -0400
commitb478491f2628114b2eae76587f22ce3789b66012 (patch)
tree038580a05fa1a3c8c9cbee0fa8743af2bba650b9 /arch/mn10300/include
parent9731d23710736b96786d68c2e63148ff3f22e6eb (diff)
MN10300: Allow some cacheflushes to be avoided if cache snooping is available
The AM34 core is able to do cache snooping, and so can skip some of the cache flushing. Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'arch/mn10300/include')
-rw-r--r--arch/mn10300/include/asm/cacheflush.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/arch/mn10300/include/asm/cacheflush.h b/arch/mn10300/include/asm/cacheflush.h
index 748143f65418..faed90240ded 100644
--- a/arch/mn10300/include/asm/cacheflush.h
+++ b/arch/mn10300/include/asm/cacheflush.h
@@ -131,18 +131,22 @@ extern void mn10300_dcache_flush_inv_range2(unsigned long start, unsigned long s
131/* 131/*
132 * Physically-indexed cache management 132 * Physically-indexed cache management
133 */ 133 */
134#ifdef CONFIG_MN10300_CACHE_ENABLED 134#if defined(CONFIG_MN10300_CACHE_FLUSH_ICACHE)
135 135extern void flush_icache_page(struct vm_area_struct *vma, struct page *page);
136extern void flush_icache_range(unsigned long start, unsigned long end);
137#elif defined(CONFIG_MN10300_CACHE_INV_ICACHE)
138static inline void flush_icache_page(struct vm_area_struct *vma,
139 struct page *page)
140{
141 mn10300_icache_inv_page(page_to_phys(page));
142}
136extern void flush_icache_range(unsigned long start, unsigned long end); 143extern void flush_icache_range(unsigned long start, unsigned long end);
137extern void flush_icache_page(struct vm_area_struct *vma, struct page *pg);
138
139#else 144#else
140
141#define flush_icache_range(start, end) do {} while (0) 145#define flush_icache_range(start, end) do {} while (0)
142#define flush_icache_page(vma, pg) do {} while (0) 146#define flush_icache_page(vma, pg) do {} while (0)
143
144#endif 147#endif
145 148
149
146#define flush_icache_user_range(vma, pg, adr, len) \ 150#define flush_icache_user_range(vma, pg, adr, len) \
147 flush_icache_range(adr, adr + len) 151 flush_icache_range(adr, adr + len)
148 152