aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-arm/cacheflush.h
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2006-12-30 18:17:40 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2007-01-08 14:49:58 -0500
commit6020dff09252e3670a89edb36baaa4afb9b10d15 (patch)
treee242232e97e71045f51bda9e0a5bb2e8f8df1c29 /include/asm-arm/cacheflush.h
parenta6f36be32622730710b2fadacb6e2649defa4371 (diff)
[ARM] Resolve fuse and direct-IO failures due to missing cache flushes
fuse does not work on ARM due to cache incoherency issues - fuse wants to use get_user_pages() to copy data from the current process into kernel space. However, since this accesses userspace via the kernel mapping, the kernel mapping can be out of date wrt data written to userspace. This can lead to unpredictable behaviour (in the case of fuse) or data corruption for direct-IO. This resolves debian bug #402876 Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'include/asm-arm/cacheflush.h')
-rw-r--r--include/asm-arm/cacheflush.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/asm-arm/cacheflush.h b/include/asm-arm/cacheflush.h
index d51049522cd0..5f531ea03059 100644
--- a/include/asm-arm/cacheflush.h
+++ b/include/asm-arm/cacheflush.h
@@ -357,6 +357,16 @@ extern void flush_dcache_page(struct page *);
357 357
358extern void __flush_dcache_page(struct address_space *mapping, struct page *page); 358extern void __flush_dcache_page(struct address_space *mapping, struct page *page);
359 359
360#define ARCH_HAS_FLUSH_ANON_PAGE
361static inline void flush_anon_page(struct vm_area_struct *vma,
362 struct page *page, unsigned long vmaddr)
363{
364 extern void __flush_anon_page(struct vm_area_struct *vma,
365 struct page *, unsigned long);
366 if (PageAnon(page))
367 __flush_anon_page(vma, page, vmaddr);
368}
369
360#define flush_dcache_mmap_lock(mapping) \ 370#define flush_dcache_mmap_lock(mapping) \
361 write_lock_irq(&(mapping)->tree_lock) 371 write_lock_irq(&(mapping)->tree_lock)
362#define flush_dcache_mmap_unlock(mapping) \ 372#define flush_dcache_mmap_unlock(mapping) \