diff options
author | Haavard Skinnemoen <hskinnemoen@atmel.com> | 2007-12-03 18:04:11 +0100 |
---|---|---|
committer | Haavard Skinnemoen <hskinnemoen@atmel.com> | 2007-12-07 14:54:47 +0100 |
commit | 68ca3e537f12044af05a653fa9d28b4fe80117e8 (patch) | |
tree | a8a2e4f9e2e18e031739a8af1e8e3d08af1770ac /include | |
parent | 2507bc1338e43eadfef5b604d2c47e4f8180718f (diff) | |
download | kernel_samsung_smdk4412-68ca3e537f12044af05a653fa9d28b4fe80117e8.zip kernel_samsung_smdk4412-68ca3e537f12044af05a653fa9d28b4fe80117e8.tar.gz kernel_samsung_smdk4412-68ca3e537f12044af05a653fa9d28b4fe80117e8.tar.bz2 |
[AVR32] Fix copy_to_user_page() breakage
The current implementation of copy_to_user_page() gives "vaddr" to the
cache instruction when trying to sync the icache with the dcache. If
vaddr does not exist in the TLB, the CPU will silently abort the
operation, which may result in the caches staying out of sync.
To fix this, pass the "dst" parameter to flush_icache_range() instead
-- we know this is valid because we just wrote to it.
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-avr32/cacheflush.h | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/include/asm-avr32/cacheflush.h b/include/asm-avr32/cacheflush.h index dfaaa88..6706747 100644 --- a/include/asm-avr32/cacheflush.h +++ b/include/asm-avr32/cacheflush.h @@ -116,15 +116,16 @@ extern void flush_icache_page(struct vm_area_struct *vma, struct page *page); * flush with all configurations. */ extern void flush_icache_range(unsigned long start, unsigned long end); -extern void flush_icache_user_range(struct vm_area_struct *vma, - struct page *page, - unsigned long addr, int len); -#define copy_to_user_page(vma, page, vaddr, dst, src, len) do { \ - memcpy(dst, src, len); \ - flush_icache_user_range(vma, page, vaddr, len); \ -} while(0) -#define copy_from_user_page(vma, page, vaddr, dst, src, len) \ - memcpy(dst, src, len) +extern void copy_to_user_page(struct vm_area_struct *vma, struct page *page, + unsigned long vaddr, void *dst, const void *src, + unsigned long len); + +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) +{ + memcpy(dst, src, len); +} #endif /* __ASM_AVR32_CACHEFLUSH_H */ |