summaryrefslogtreecommitdiffstats
path: root/include/asm-mips/cacheflush.h
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2008-04-05 16:13:23 +0200
committerRalf Baechle <ralf@linux-mips.org>2008-04-07 23:31:04 +0200
commit9c5a3d729cf430609d091ff610a7db363aafcd47 (patch)
tree29f56334c48e2b9aeb80880813e045a7be6e4688 /include/asm-mips/cacheflush.h
parentMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86... (diff)
downloadlinux-9c5a3d729cf430609d091ff610a7db363aafcd47.tar.xz
linux-9c5a3d729cf430609d091ff610a7db363aafcd47.zip
[MIPS] Handle aliases in vmalloc correctly.
flush_cache_vmap / flush_cache_vunmap were calling flush_cache_all which - having been deprecated - turned into a nop ... Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to '')
-rw-r--r--include/asm-mips/cacheflush.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/include/asm-mips/cacheflush.h b/include/asm-mips/cacheflush.h
index 01e7eadc97e2..d5c0f2fda51b 100644
--- a/include/asm-mips/cacheflush.h
+++ b/include/asm-mips/cacheflush.h
@@ -63,8 +63,22 @@ static inline void flush_icache_page(struct vm_area_struct *vma,
}
extern void (*flush_icache_range)(unsigned long start, unsigned long end);
-#define flush_cache_vmap(start, end) flush_cache_all()
-#define flush_cache_vunmap(start, end) flush_cache_all()
+
+extern void (*__flush_cache_vmap)(void);
+
+static inline void flush_cache_vmap(unsigned long start, unsigned long end)
+{
+ if (cpu_has_dc_aliases)
+ __flush_cache_vmap();
+}
+
+extern void (*__flush_cache_vunmap)(void);
+
+static inline void flush_cache_vunmap(unsigned long start, unsigned long end)
+{
+ if (cpu_has_dc_aliases)
+ __flush_cache_vunmap();
+}
extern void copy_to_user_page(struct vm_area_struct *vma,
struct page *page, unsigned long vaddr, void *dst, const void *src,