]> rtime.felk.cvut.cz Git - lisovros/linux_canprio.git/commitdiff
arm: add mm API for DMA to vmalloc/vmap areas
authorJames Bottomley <James.Bottomley@suse.de>
Mon, 25 Jan 2010 17:42:22 +0000 (11:42 -0600)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Fri, 5 Feb 2010 18:32:34 +0000 (12:32 -0600)
ARM cannot prevent cache movein, so this patch implements both the
flush and invalidate pieces of the API.

Signed-off-by: James Bottomley <James.Bottomley@suse.de>
arch/arm/include/asm/cacheflush.h

index 730aefcfbee3eb8e0c46ea0a6dc0b9ba0fd1e27f..4ae503cb1b8a4edba0ebec69a59630826f89bafb 100644 (file)
@@ -432,6 +432,16 @@ static inline void __flush_icache_all(void)
            : "r" (0));
 #endif
 }
+static inline void flush_kernel_vmap_range(void *addr, int size)
+{
+       if ((cache_is_vivt() || cache_is_vipt_aliasing()))
+         __cpuc_flush_dcache_area(addr, (size_t)size);
+}
+static inline void invalidate_kernel_vmap_range(void *addr, int size)
+{
+       if ((cache_is_vivt() || cache_is_vipt_aliasing()))
+         __cpuc_flush_dcache_area(addr, (size_t)size);
+}
 
 #define ARCH_HAS_FLUSH_ANON_PAGE
 static inline void flush_anon_page(struct vm_area_struct *vma,