ARM: integrate CMA with DMA-mapping subsystem
authorMarek Szyprowski <m.szyprowski@samsung.com>
Thu, 29 Dec 2011 12:09:51 +0000 (13:09 +0100)
committerHiroshi Doyu <hdoyu@nvidia.com>
Fri, 7 Sep 2012 08:46:05 +0000 (11:46 +0300)
commit8f209180915de3219f087a9ba6743bb815cd567e
tree56116dc18b906098288cb6ebd176a2d9f48b0329
parente0ceb1c6cdb4b37cd0713f940cf83364274d7500
ARM: integrate CMA with DMA-mapping subsystem

This patch adds support for CMA to dma-mapping subsystem for ARM
architecture. By default a global CMA area is used, but specific devices
are allowed to have their private memory areas if required (they can be
created with dma_declare_contiguous() function during board
initialisation).

Contiguous memory areas reserved for DMA are remapped with 2-level page
tables on boot. Once a buffer is requested, a low memory kernel mapping
is updated to to match requested memory access type.

GFP_ATOMIC allocations are performed from special pool which is created
early during boot. This way remapping page attributes is not needed on
allocation time.

CMA has been enabled unconditionally for ARMv6+ systems.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
CC: Michal Nazarewicz <mina86@mina86.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Tested-by: Rob Clark <rob.clark@linaro.org>
Tested-by: Ohad Ben-Cohen <ohad@wizery.com>
Tested-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Tested-by: Robert Nelson <robertcnelson@gmail.com>
Tested-by: Barry Song <Baohua.Song@csr.com>

Conflicts:

arch/arm/mm/mmu.c

Change-Id: I6d2b534e6ea7b1e1eb6824fa6ce554c9656963f2
Signed-off-by: Hiroshi DOYU <hdoyu@nvidia.com>
Documentation/kernel-parameters.txt
arch/arm/Kconfig
arch/arm/include/asm/dma-contiguous.h [new file with mode: 0644]
arch/arm/include/asm/mach/map.h
arch/arm/kernel/setup.c
arch/arm/mm/dma-mapping.c
arch/arm/mm/init.c
arch/arm/mm/mm.h
arch/arm/mm/mmu.c