diff options
author | Marek Szyprowski <m.szyprowski@samsung.com> | 2011-12-29 07:09:51 -0500 |
---|---|---|
committer | Marek Szyprowski <m.szyprowski@samsung.com> | 2012-05-21 09:09:38 -0400 |
commit | c79095092834a18ae74cfc08def1a5a101dc106c (patch) | |
tree | c6cd81c38b92dcdb269288ab9a125bc13f4bb339 /arch/arm/mm/mm.h | |
parent | 0a2b9a6ea93650b8a00f9fd5ee8fdd25671e2df6 (diff) |
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>
Diffstat (limited to 'arch/arm/mm/mm.h')
-rw-r--r-- | arch/arm/mm/mm.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm/mm/mm.h b/arch/arm/mm/mm.h index 27f4a619b35d..93dc0c17cdcb 100644 --- a/arch/arm/mm/mm.h +++ b/arch/arm/mm/mm.h | |||
@@ -67,5 +67,8 @@ extern u32 arm_dma_limit; | |||
67 | #define arm_dma_limit ((u32)~0) | 67 | #define arm_dma_limit ((u32)~0) |
68 | #endif | 68 | #endif |
69 | 69 | ||
70 | extern phys_addr_t arm_lowmem_limit; | ||
71 | |||
70 | void __init bootmem_init(void); | 72 | void __init bootmem_init(void); |
71 | void arm_mm_memblock_reserve(void); | 73 | void arm_mm_memblock_reserve(void); |
74 | void dma_contiguous_remap(void); | ||