aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/include/asm/cacheflush.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/include/asm/cacheflush.h')
-rw-r--r--arch/arm/include/asm/cacheflush.h22
1 files changed, 15 insertions, 7 deletions
diff --git a/arch/arm/include/asm/cacheflush.h b/arch/arm/include/asm/cacheflush.h
index 3d0cdd21b882..9fd6d3ab68c0 100644
--- a/arch/arm/include/asm/cacheflush.h
+++ b/arch/arm/include/asm/cacheflush.h
@@ -331,15 +331,15 @@ static inline void outer_flush_range(unsigned long start, unsigned long end)
331 * Convert calls to our calling convention. 331 * Convert calls to our calling convention.
332 */ 332 */
333#define flush_cache_all() __cpuc_flush_kern_all() 333#define flush_cache_all() __cpuc_flush_kern_all()
334#ifndef CONFIG_CPU_CACHE_VIPT 334
335static inline void flush_cache_mm(struct mm_struct *mm) 335static inline void vivt_flush_cache_mm(struct mm_struct *mm)
336{ 336{
337 if (cpumask_test_cpu(smp_processor_id(), mm_cpumask(mm))) 337 if (cpumask_test_cpu(smp_processor_id(), mm_cpumask(mm)))
338 __cpuc_flush_user_all(); 338 __cpuc_flush_user_all();
339} 339}
340 340
341static inline void 341static inline void
342flush_cache_range(struct vm_area_struct *vma, unsigned long start, unsigned long end) 342vivt_flush_cache_range(struct vm_area_struct *vma, unsigned long start, unsigned long end)
343{ 343{
344 if (cpumask_test_cpu(smp_processor_id(), mm_cpumask(vma->vm_mm))) 344 if (cpumask_test_cpu(smp_processor_id(), mm_cpumask(vma->vm_mm)))
345 __cpuc_flush_user_range(start & PAGE_MASK, PAGE_ALIGN(end), 345 __cpuc_flush_user_range(start & PAGE_MASK, PAGE_ALIGN(end),
@@ -347,7 +347,7 @@ flush_cache_range(struct vm_area_struct *vma, unsigned long start, unsigned long
347} 347}
348 348
349static inline void 349static inline void
350flush_cache_page(struct vm_area_struct *vma, unsigned long user_addr, unsigned long pfn) 350vivt_flush_cache_page(struct vm_area_struct *vma, unsigned long user_addr, unsigned long pfn)
351{ 351{
352 if (cpumask_test_cpu(smp_processor_id(), mm_cpumask(vma->vm_mm))) { 352 if (cpumask_test_cpu(smp_processor_id(), mm_cpumask(vma->vm_mm))) {
353 unsigned long addr = user_addr & PAGE_MASK; 353 unsigned long addr = user_addr & PAGE_MASK;
@@ -356,7 +356,7 @@ flush_cache_page(struct vm_area_struct *vma, unsigned long user_addr, unsigned l
356} 356}
357 357
358static inline void 358static inline void
359flush_ptrace_access(struct vm_area_struct *vma, struct page *page, 359vivt_flush_ptrace_access(struct vm_area_struct *vma, struct page *page,
360 unsigned long uaddr, void *kaddr, 360 unsigned long uaddr, void *kaddr,
361 unsigned long len, int write) 361 unsigned long len, int write)
362{ 362{
@@ -365,6 +365,16 @@ flush_ptrace_access(struct vm_area_struct *vma, struct page *page,
365 __cpuc_coherent_kern_range(addr, addr + len); 365 __cpuc_coherent_kern_range(addr, addr + len);
366 } 366 }
367} 367}
368
369#ifndef CONFIG_CPU_CACHE_VIPT
370#define flush_cache_mm(mm) \
371 vivt_flush_cache_mm(mm)
372#define flush_cache_range(vma,start,end) \
373 vivt_flush_cache_range(vma,start,end)
374#define flush_cache_page(vma,addr,pfn) \
375 vivt_flush_cache_page(vma,addr,pfn)
376#define flush_ptrace_access(vma,page,ua,ka,len,write) \
377 vivt_flush_ptrace_access(vma,page,ua,ka,len,write)
368#else 378#else
369extern void flush_cache_mm(struct mm_struct *mm); 379extern void flush_cache_mm(struct mm_struct *mm);
370extern void flush_cache_range(struct vm_area_struct *vma, unsigned long start, unsigned long end); 380extern void flush_cache_range(struct vm_area_struct *vma, unsigned long start, unsigned long end);
@@ -410,8 +420,6 @@ extern void flush_ptrace_access(struct vm_area_struct *vma, struct page *page,
410 */ 420 */
411extern void flush_dcache_page(struct page *); 421extern void flush_dcache_page(struct page *);
412 422
413extern void __flush_dcache_page(struct address_space *mapping, struct page *page);
414
415static inline void __flush_icache_all(void) 423static inline void __flush_icache_all(void)
416{ 424{
417#ifdef CONFIG_ARM_ERRATA_411920 425#ifdef CONFIG_ARM_ERRATA_411920