aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2005-03-18 12:36:42 -0500
committerRalf Baechle <ralf@linux-mips.org>2005-10-29 14:30:57 -0400
commit53de0d471fe8ddbbeca938cffedb4cc94e04da10 (patch)
tree1bf55f2b45acbe7d5ca448fb3c8324eeb855ebdf
parent1592dac2410511d24836e18d416b1d02c678322b (diff)
Reformat; cosmetic cleanups.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r--arch/mips/mm/cache.c3
-rw-r--r--include/asm-mips/cacheflush.h31
2 files changed, 20 insertions, 14 deletions
diff --git a/arch/mips/mm/cache.c b/arch/mips/mm/cache.c
index fe0110074902..eaecb8631973 100644
--- a/arch/mips/mm/cache.c
+++ b/arch/mips/mm/cache.c
@@ -23,7 +23,8 @@ void (*__flush_cache_all)(void);
23void (*flush_cache_mm)(struct mm_struct *mm); 23void (*flush_cache_mm)(struct mm_struct *mm);
24void (*flush_cache_range)(struct vm_area_struct *vma, unsigned long start, 24void (*flush_cache_range)(struct vm_area_struct *vma, unsigned long start,
25 unsigned long end); 25 unsigned long end);
26void (*flush_cache_page)(struct vm_area_struct *vma, unsigned long page, unsigned long pfn); 26void (*flush_cache_page)(struct vm_area_struct *vma, unsigned long page,
27 unsigned long pfn);
27void (*flush_icache_range)(unsigned long __user start, 28void (*flush_icache_range)(unsigned long __user start,
28 unsigned long __user end); 29 unsigned long __user end);
29void (*flush_icache_page)(struct vm_area_struct *vma, struct page *page); 30void (*flush_icache_page)(struct vm_area_struct *vma, struct page *page);
diff --git a/include/asm-mips/cacheflush.h b/include/asm-mips/cacheflush.h
index 3711d720aeb4..4213d2c8bb8a 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,
54#define flush_cache_vmap(start, end) flush_cache_all() 54#define flush_cache_vmap(start, end) flush_cache_all()
55#define flush_cache_vunmap(start, end) flush_cache_all() 55#define flush_cache_vunmap(start, end) flush_cache_all()
56 56
57#define copy_to_user_page(vma, page, vaddr, dst, src, len) \ 57static inline void copy_to_user_page(struct vm_area_struct *vma,
58do { \ 58 struct page *page, unsigned long vaddr, void *dst, const void *src,
59 if (cpu_has_dc_aliases) \ 59 unsigned long len)
60 flush_cache_page(vma, vaddr); \ 60{
61 memcpy(dst, (void *) src, len); \ 61 if (cpu_has_dc_aliases)
62 flush_icache_page(vma, page); \ 62 flush_cache_page(vma, vaddr, page_to_pfn(page));
63} while (0) 63 memcpy(dst, src, len);
64#define copy_from_user_page(vma, page, vaddr, dst, src, len) \ 64 flush_icache_page(vma, page);
65do { \ 65}
66 if (cpu_has_dc_aliases) \ 66
67 flush_cache_page(vma, vaddr); \ 67static inline void copy_from_user_page(struct vm_area_struct *vma,
68 memcpy(dst, src, len); \ 68 struct page *page, unsigned long vaddr, void *dst, const void *src,
69} while (0) 69 unsigned long len)
70{
71 if (cpu_has_dc_aliases)
72 flush_cache_page(vma, vaddr, page_to_pfn(page));
73 memcpy(dst, src, len);
74}
70 75
71extern void (*flush_cache_sigtramp)(unsigned long addr); 76extern void (*flush_cache_sigtramp)(unsigned long addr);
72extern void (*flush_icache_all)(void); 77extern void (*flush_icache_all)(void);