Skip to content

Commit

Permalink
arm: add mm API for DMA to vmalloc/vmap areas
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
James Bottomley authored and James Bottomley committed Feb 5, 2010
1 parent ef7cc35 commit 252a9af
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions arch/arm/include/asm/cacheflush.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 252a9af

Please sign in to comment.