diff options
author | David Howells <dhowells@redhat.com> | 2010-10-27 17:28:46 +0100 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2010-10-27 17:28:46 +0100 |
commit | b478491f2628114b2eae76587f22ce3789b66012 (patch) | |
tree | 038580a05fa1a3c8c9cbee0fa8743af2bba650b9 /arch/mn10300/include | |
parent | 9731d23710736b96786d68c2e63148ff3f22e6eb (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.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/arch/mn10300/include/asm/cacheflush.h b/arch/mn10300/include/asm/cacheflush.h index 748143f6541..faed90240de 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 /* * Physically-indexed cache management */ -#ifdef CONFIG_MN10300_CACHE_ENABLED - +#if defined(CONFIG_MN10300_CACHE_FLUSH_ICACHE) +extern void flush_icache_page(struct vm_area_struct *vma, struct page *page); +extern void flush_icache_range(unsigned long start, unsigned long end); +#elif defined(CONFIG_MN10300_CACHE_INV_ICACHE) +static inline void flush_icache_page(struct vm_area_struct *vma, + struct page *page) +{ + mn10300_icache_inv_page(page_to_phys(page)); +} extern void flush_icache_range(unsigned long start, unsigned long end); -extern void flush_icache_page(struct vm_area_struct *vma, struct page *pg); - #else - #define flush_icache_range(start, end) do {} while (0) #define flush_icache_page(vma, pg) do {} while (0) - #endif + #define flush_icache_user_range(vma, pg, adr, len) \ flush_icache_range(adr, adr + len) |