aboutsummaryrefslogtreecommitdiff
path: root/arch/mips/include/asm/cacheflush.h
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2011-11-07 12:27:23 -0800
committerTony Lindgren <tony@atomide.com>2011-11-07 12:27:23 -0800
commitd30cc16c8e48368e0518f4975a78711e53e14a0f (patch)
tree26b57f7ab5a963cc3d6c57dff6951bd930875583 /arch/mips/include/asm/cacheflush.h
parent41eb2d813f558900884e240c2f723e36c7bd151f (diff)
parenta1bcc1dcef8451b4291ea2a1b2677cb194102952 (diff)
Merge branch 'fixes-modulesplit' into fixes
Diffstat (limited to 'arch/mips/include/asm/cacheflush.h')
-rw-r--r--arch/mips/include/asm/cacheflush.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/arch/mips/include/asm/cacheflush.h b/arch/mips/include/asm/cacheflush.h
index 40bb9fde205..69468ded282 100644
--- a/arch/mips/include/asm/cacheflush.h
+++ b/arch/mips/include/asm/cacheflush.h
@@ -114,4 +114,28 @@ unsigned long run_uncached(void *func);
extern void *kmap_coherent(struct page *page, unsigned long addr);
extern void kunmap_coherent(void);
+#define ARCH_HAS_FLUSH_KERNEL_DCACHE_PAGE
+static inline void flush_kernel_dcache_page(struct page *page)
+{
+ BUG_ON(cpu_has_dc_aliases && PageHighMem(page));
+}
+
+/*
+ * For now flush_kernel_vmap_range and invalidate_kernel_vmap_range both do a
+ * cache writeback and invalidate operation.
+ */
+extern void (*__flush_kernel_vmap_range)(unsigned long vaddr, int size);
+
+static inline void flush_kernel_vmap_range(void *vaddr, int size)
+{
+ if (cpu_has_dc_aliases)
+ __flush_kernel_vmap_range((unsigned long) vaddr, size);
+}
+
+static inline void invalidate_kernel_vmap_range(void *vaddr, int size)
+{
+ if (cpu_has_dc_aliases)
+ __flush_kernel_vmap_range((unsigned long) vaddr, size);
+}
+
#endif /* _ASM_CACHEFLUSH_H */