summaryrefslogtreecommitdiffstats
path: root/include/asm-mips/cacheflush.h
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2005-03-18 17:36:42 +0000
committerRalf Baechle <ralf@linux-mips.org>2005-10-29 19:30:57 +0100
commit53de0d471fe8ddbbeca938cffedb4cc94e04da10 (patch)
tree1bf55f2b45acbe7d5ca448fb3c8324eeb855ebdf /include/asm-mips/cacheflush.h
parent1592dac2410511d24836e18d416b1d02c678322b (diff)
Reformat; cosmetic cleanups.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'include/asm-mips/cacheflush.h')
-rw-r--r--include/asm-mips/cacheflush.h31
1 files changed, 18 insertions, 13 deletions
diff --git a/include/asm-mips/cacheflush.h b/include/asm-mips/cacheflush.h
index 3711d720aeb..4213d2c8bb8 100644
--- a/include/asm-mips/cacheflush.h
+++ b/include/asm-mips/cacheflush.h
@@ -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);