diff options
Diffstat (limited to 'include/asm-m68k/cacheflush.h')
-rw-r--r-- | include/asm-m68k/cacheflush.h | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/include/asm-m68k/cacheflush.h b/include/asm-m68k/cacheflush.h index e4773946f10d..8aba971b1368 100644 --- a/include/asm-m68k/cacheflush.h +++ b/include/asm-m68k/cacheflush.h | |||
@@ -130,20 +130,25 @@ static inline void __flush_page_to_ram(void *vaddr) | |||
130 | #define flush_dcache_mmap_lock(mapping) do { } while (0) | 130 | #define flush_dcache_mmap_lock(mapping) do { } while (0) |
131 | #define flush_dcache_mmap_unlock(mapping) do { } while (0) | 131 | #define flush_dcache_mmap_unlock(mapping) do { } while (0) |
132 | #define flush_icache_page(vma, page) __flush_page_to_ram(page_address(page)) | 132 | #define flush_icache_page(vma, page) __flush_page_to_ram(page_address(page)) |
133 | #define flush_icache_user_range(vma,pg,adr,len) do { } while (0) | ||
134 | |||
135 | #define copy_to_user_page(vma, page, vaddr, dst, src, len) \ | ||
136 | do { \ | ||
137 | flush_cache_page(vma, vaddr, page_to_pfn(page));\ | ||
138 | memcpy(dst, src, len); \ | ||
139 | } while (0) | ||
140 | |||
141 | #define copy_from_user_page(vma, page, vaddr, dst, src, len) \ | ||
142 | do { \ | ||
143 | flush_cache_page(vma, vaddr, page_to_pfn(page));\ | ||
144 | memcpy(dst, src, len); \ | ||
145 | } while (0) | ||
146 | 133 | ||
134 | extern void flush_icache_user_range(struct vm_area_struct *vma, struct page *page, | ||
135 | unsigned long addr, int len); | ||
147 | extern void flush_icache_range(unsigned long address, unsigned long endaddr); | 136 | extern void flush_icache_range(unsigned long address, unsigned long endaddr); |
148 | 137 | ||
138 | static inline void copy_to_user_page(struct vm_area_struct *vma, | ||
139 | struct page *page, unsigned long vaddr, | ||
140 | void *dst, void *src, int len) | ||
141 | { | ||
142 | flush_cache_page(vma, vaddr, page_to_pfn(page)); | ||
143 | memcpy(dst, src, len); | ||
144 | flush_icache_user_range(vma, page, vaddr, len); | ||
145 | } | ||
146 | static inline void copy_from_user_page(struct vm_area_struct *vma, | ||
147 | struct page *page, unsigned long vaddr, | ||
148 | void *dst, void *src, int len) | ||
149 | { | ||
150 | flush_cache_page(vma, vaddr, page_to_pfn(page)); | ||
151 | memcpy(dst, src, len); | ||
152 | } | ||
153 | |||
149 | #endif /* _M68K_CACHEFLUSH_H */ | 154 | #endif /* _M68K_CACHEFLUSH_H */ |