diff options
Diffstat (limited to 'arch/mips/include/asm/cacheflush.h')
-rw-r--r-- | arch/mips/include/asm/cacheflush.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/arch/mips/include/asm/cacheflush.h b/arch/mips/include/asm/cacheflush.h index 40bb9fde205f..69468ded2828 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); | |||
114 | extern void *kmap_coherent(struct page *page, unsigned long addr); | 114 | extern void *kmap_coherent(struct page *page, unsigned long addr); |
115 | extern void kunmap_coherent(void); | 115 | extern void kunmap_coherent(void); |
116 | 116 | ||
117 | #define ARCH_HAS_FLUSH_KERNEL_DCACHE_PAGE | ||
118 | static inline void flush_kernel_dcache_page(struct page *page) | ||
119 | { | ||
120 | BUG_ON(cpu_has_dc_aliases && PageHighMem(page)); | ||
121 | } | ||
122 | |||
123 | /* | ||
124 | * For now flush_kernel_vmap_range and invalidate_kernel_vmap_range both do a | ||
125 | * cache writeback and invalidate operation. | ||
126 | */ | ||
127 | extern void (*__flush_kernel_vmap_range)(unsigned long vaddr, int size); | ||
128 | |||
129 | static inline void flush_kernel_vmap_range(void *vaddr, int size) | ||
130 | { | ||
131 | if (cpu_has_dc_aliases) | ||
132 | __flush_kernel_vmap_range((unsigned long) vaddr, size); | ||
133 | } | ||
134 | |||
135 | static inline void invalidate_kernel_vmap_range(void *vaddr, int size) | ||
136 | { | ||
137 | if (cpu_has_dc_aliases) | ||
138 | __flush_kernel_vmap_range((unsigned long) vaddr, size); | ||
139 | } | ||
140 | |||
117 | #endif /* _ASM_CACHEFLUSH_H */ | 141 | #endif /* _ASM_CACHEFLUSH_H */ |