]> err.no Git - linux-2.6/commitdiff
Reformat; cosmetic cleanups.
authorRalf Baechle <ralf@linux-mips.org>
Fri, 18 Mar 2005 17:36:42 +0000 (17:36 +0000)
committerRalf Baechle <ralf@linux-mips.org>
Sat, 29 Oct 2005 18:30:57 +0000 (19:30 +0100)
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/mm/cache.c
include/asm-mips/cacheflush.h

index fe0110074902dea0c03f3cd20d36208b62d0042d..eaecb8631973dfe7a33425a1d113e690000fe071 100644 (file)
@@ -23,7 +23,8 @@ void (*__flush_cache_all)(void);
 void (*flush_cache_mm)(struct mm_struct *mm);
 void (*flush_cache_range)(struct vm_area_struct *vma, unsigned long start,
        unsigned long end);
-void (*flush_cache_page)(struct vm_area_struct *vma, unsigned long page, unsigned long pfn);
+void (*flush_cache_page)(struct vm_area_struct *vma, unsigned long page,
+       unsigned long pfn);
 void (*flush_icache_range)(unsigned long __user start,
        unsigned long __user end);
 void (*flush_icache_page)(struct vm_area_struct *vma, struct page *page);
index 3711d720aeb4f1bc77a56f24513d58b4af5e7100..4213d2c8bb8a595ebe0fe5adb6e3b21d8e246600 100644 (file)
@@ -54,19 +54,24 @@ extern void (*flush_icache_range)(unsigned long __user start,
 #define flush_cache_vmap(start, end)           flush_cache_all()
 #define flush_cache_vunmap(start, end)         flush_cache_all()
 
-#define copy_to_user_page(vma, page, vaddr, dst, src, len)             \
-do {                                                                   \
-       if (cpu_has_dc_aliases)                                         \
-               flush_cache_page(vma, vaddr);                           \
-       memcpy(dst, (void *) src, len);                                 \
-       flush_icache_page(vma, page);                                   \
-} while (0)
-#define copy_from_user_page(vma, page, vaddr, dst, src, len)           \
-do {                                                                   \
-       if (cpu_has_dc_aliases)                                         \
-               flush_cache_page(vma, vaddr);                           \
-       memcpy(dst, src, len);                                          \
-} while (0)
+static inline void copy_to_user_page(struct vm_area_struct *vma,
+       struct page *page, unsigned long vaddr, void *dst, const void *src,
+       unsigned long len)
+{
+       if (cpu_has_dc_aliases)
+               flush_cache_page(vma, vaddr, page_to_pfn(page));
+       memcpy(dst, src, len);
+       flush_icache_page(vma, page);
+}
+
+static inline void copy_from_user_page(struct vm_area_struct *vma,
+       struct page *page, unsigned long vaddr, void *dst, const void *src,
+       unsigned long len)
+{
+       if (cpu_has_dc_aliases)
+               flush_cache_page(vma, vaddr, page_to_pfn(page));
+       memcpy(dst, src, len);
+}
 
 extern void (*flush_cache_sigtramp)(unsigned long addr);
 extern void (*flush_icache_all)(void);