]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
ARM: OMAP: Update cache flushing to compile on VIVT
authorTony Lindgren <tony@atomide.com>
Mon, 15 Aug 2005 09:51:21 +0000 (02:51 -0700)
committerTony Lindgren <tony@atomide.com>
Mon, 15 Aug 2005 09:51:21 +0000 (02:51 -0700)
Update cache flushing to compile on VIVT

arch/arm/mm/flush.c
include/asm-arm/cacheflush.h

index b82cd171a5a72d20b5c47f996c6ae94d92c8d160..828950727298bac9d0564e8bdecc2813887da011 100644 (file)
@@ -122,7 +122,7 @@ EXPORT_SYMBOL(flush_dcache_page);
 void flush_cache_mm(struct mm_struct *mm)
 {
        if (cache_is_vivt()) {
-               if (current->active_mm == mm)
+               if (cpu_isset(smp_processor_id(), mm->cpu_vm_mask))
                        __cpuc_flush_user_all();
                return;
        }
@@ -140,7 +140,7 @@ void flush_cache_mm(struct mm_struct *mm)
 void flush_cache_range(struct vm_area_struct *vma, unsigned long start, unsigned long end)
 {
        if (cache_is_vivt()) {
-               if (current->active_mm == vma->vm_mm)
+               if (cpu_isset(smp_processor_id(), vma->vm_mm->cpu_vm_mask))
                        __cpuc_flush_user_range(start & PAGE_MASK, PAGE_ALIGN(end),
                                                vma->vm_flags);
                return;
@@ -159,7 +159,7 @@ void flush_cache_range(struct vm_area_struct *vma, unsigned long start, unsigned
 void flush_cache_page(struct vm_area_struct *vma, unsigned long user_addr, unsigned long pfn)
 {
        if (cache_is_vivt()) {
-               if (current->active_mm == vma->vm_mm) {
+               if (cpu_isset(smp_processor_id(), vma->vm_mm->cpu_vm_mask)) {
                        unsigned long addr = user_addr & PAGE_MASK;
                        __cpuc_flush_user_range(addr, addr + PAGE_SIZE, vma->vm_flags);
                }
index e81baff4f54b3293d18290088af1e1ac1f65fabe..ca51ed8750e42adedb26321ef9f65f99bc8c0e63 100644 (file)
@@ -256,34 +256,9 @@ extern void dmac_flush_range(unsigned long, unsigned long);
  * Convert calls to our calling convention.
  */
 #define flush_cache_all()              __cpuc_flush_kern_all()
-#ifndef CONFIG_CPU_CACHE_VIPT
-static inline void flush_cache_mm(struct mm_struct *mm)
-{
-       if (cpu_isset(smp_processor_id(), mm->cpu_vm_mask))
-               __cpuc_flush_user_all();
-}
-
-static inline void
-flush_cache_range(struct vm_area_struct *vma, unsigned long start, unsigned long end)
-{
-       if (cpu_isset(smp_processor_id(), vma->vm_mm->cpu_vm_mask))
-               __cpuc_flush_user_range(start & PAGE_MASK, PAGE_ALIGN(end),
-                                       vma->vm_flags);
-}
-
-static inline void
-flush_cache_page(struct vm_area_struct *vma, unsigned long user_addr, unsigned long pfn)
-{
-       if (cpu_isset(smp_processor_id(), vma->vm_mm->cpu_vm_mask)) {
-               unsigned long addr = user_addr & PAGE_MASK;
-               __cpuc_flush_user_range(addr, addr + PAGE_SIZE, vma->vm_flags);
-       }
-}
-#else
 extern void flush_cache_mm(struct mm_struct *mm);
 extern void flush_cache_range(struct vm_area_struct *vma, unsigned long start, unsigned long end);
 extern void flush_cache_page(struct vm_area_struct *vma, unsigned long user_addr, unsigned long pfn);
-#endif
 
 /*
  * flush_cache_user_range is used when we want to ensure that the