Revert "[ARM] Do not call flush_cache_user_range with mmap_sem held"
author黄涛 <huangtao@rock-chips.com>
Sat, 30 Jul 2011 14:16:37 +0000 (22:16 +0800)
committer黄涛 <huangtao@rock-chips.com>
Sat, 30 Jul 2011 14:16:37 +0000 (22:16 +0800)
This reverts commit 7bc14acfbb86b00a93ddb1c40d9d2050cd7188fe.

arch/arm/include/asm/cacheflush.h
arch/arm/kernel/traps.c

index 3e32991c04fa40ff8a6252980f2e6fdee7edb4de..3d0cdd21b882d1d39cade901827b17509c63e06e 100644 (file)
@@ -381,7 +381,7 @@ extern void flush_ptrace_access(struct vm_area_struct *vma, struct page *page,
  * Harvard caches are synchronised for the user space address range.
  * This is used for the ARM private sys_cacheflush system call.
  */
-#define flush_cache_user_range(start,end) \
+#define flush_cache_user_range(vma,start,end) \
        __cpuc_coherent_user_range((start) & PAGE_MASK, PAGE_ALIGN(end))
 
 /*
index 14abab76019accaf91300b5dde6a034fc9d221ef..c1750dd70ab6ca0a1a584d863d79d8e3ee0f46ae 100644 (file)
@@ -438,9 +438,7 @@ do_cache_op(unsigned long start, unsigned long end, int flags)
                if (end > vma->vm_end)
                        end = vma->vm_end;
 
-               up_read(&mm->mmap_sem);
-               flush_cache_user_range(start, end);
-               return;
+               flush_cache_user_range(vma, start, end);
        }
        up_read(&mm->mmap_sem);
 }