diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2005-03-18 12:36:42 -0500 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2005-10-29 14:30:57 -0400 |
commit | 53de0d471fe8ddbbeca938cffedb4cc94e04da10 (patch) | |
tree | 1bf55f2b45acbe7d5ca448fb3c8324eeb855ebdf /include | |
parent | 1592dac2410511d24836e18d416b1d02c678322b (diff) |
Reformat; cosmetic cleanups.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-mips/cacheflush.h | 31 |
1 files changed, 18 insertions, 13 deletions
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) \ | 57 | static inline void copy_to_user_page(struct vm_area_struct *vma, |
58 | do { \ | 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); |
65 | do { \ | 65 | } |
66 | if (cpu_has_dc_aliases) \ | 66 | |
67 | flush_cache_page(vma, vaddr); \ | 67 | static 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 | ||
71 | extern void (*flush_cache_sigtramp)(unsigned long addr); | 76 | extern void (*flush_cache_sigtramp)(unsigned long addr); |
72 | extern void (*flush_icache_all)(void); | 77 | extern void (*flush_icache_all)(void); |