ARM: integrate CMA with DMA-mapping subsystem
authorMarek Szyprowski <m.szyprowski@samsung.com>
Thu, 29 Dec 2011 12:09:51 +0000 (13:09 +0100)
committerGrazvydas Ignotas <notasas@gmail.com>
Mon, 25 Feb 2013 18:34:20 +0000 (20:34 +0200)
commitf076b7484f48886acdd6266c0b4859649dd2cd66
treee33d577c0f622062b137aa37657d3fa30b470e75
parent162b7d7bec0ce82387e00c2753ed1be370891973
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.

[notasas@gmail.com: change includes for 3.2]
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/kernel/setup.c
arch/arm/mm/init.c
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