common: dma-mapping: add support for generic dma_mmap_* calls
authorMarek Szyprowski <m.szyprowski@samsung.com>
Thu, 14 Jun 2012 11:03:04 +0000 (13:03 +0200)
committerHiroshi Doyu <hdoyu@nvidia.com>
Fri, 7 Sep 2012 08:46:10 +0000 (11:46 +0300)
commitb1d956d891d30fd6cec9e9e46dd9cf40be8ef4aa
treeb7abe73f4ece634a12595925c632815132eded88
parentc5ee2204bacc277da48145f4ff7b2076a88e891d
common: dma-mapping: add support for generic dma_mmap_* calls

Commit 9adc5374 ('common: dma-mapping: introduce mmap method') added a
generic method for implementing mmap user call to dma_map_ops structure.

This patch converts ARM and PowerPC architectures (the only providers of
dma_mmap_coherent/dma_mmap_writecombine calls) to use this generic
dma_map_ops based call and adds a generic cross architecture
definition for dma_mmap_attrs, dma_mmap_coherent, dma_mmap_writecombine
functions.

The generic mmap virt_to_page-based fallback implementation is provided for
architectures which don't provide their own implementation for mmap method.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Kyungmin Park <kyungmin.park@samsung.com>
arch/arm/include/asm/dma-mapping.h
arch/powerpc/include/asm/dma-mapping.h
arch/powerpc/kernel/dma-iommu.c
arch/powerpc/kernel/dma-swiotlb.c
arch/powerpc/kernel/dma.c
arch/powerpc/kernel/vio.c
drivers/base/dma-mapping.c
include/asm-generic/dma-coherent.h
include/asm-generic/dma-mapping-common.h