aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorMarek Szyprowski <m.szyprowski@samsung.com>2011-12-29 13:09:51 +0100
committerZiyan <jaraidaniel@gmail.com>2016-04-03 14:55:59 +0200
commit6be94bc9f30fad63534941d52930a97e27efc224 (patch)
tree6a55eb698fcb710651e89a6910b9e2376831d606 /arch
parent39625d2cb28ade9a8390dd3225b0bb40623a42e3 (diff)
downloadkernel_samsung_tuna-6be94bc9f30fad63534941d52930a97e27efc224.zip
kernel_samsung_tuna-6be94bc9f30fad63534941d52930a97e27efc224.tar.gz
kernel_samsung_tuna-6be94bc9f30fad63534941d52930a97e27efc224.tar.bz2
drivers: add Contiguous Memory Allocator
The Contiguous Memory Allocator is a set of helper functions for DMA mapping framework that improves allocations of contiguous memory chunks. CMA grabs memory on system boot, marks it with MIGRATE_CMA migrate type and gives back to the system. Kernel is allowed to allocate only movable pages within CMA's managed memory so that it can be used for example for page cache when DMA mapping do not use it. On dma_alloc_from_contiguous() request such pages are migrated out of CMA area to free required contiguous block and fulfill the request. This allows to allocate large contiguous chunks of memory at any time assuming that there is enough free memory available in the system. This code is heavily based on earlier works by Michal Nazarewicz. Change-Id: I686c81fddee3197aa53c7668350673ce8fdb02ef Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: 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')
-rw-r--r--arch/Kconfig3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/Kconfig b/arch/Kconfig
index 26b0e23..228d761 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -124,6 +124,9 @@ config HAVE_ARCH_TRACEHOOK
config HAVE_DMA_ATTRS
bool
+config HAVE_DMA_CONTIGUOUS
+ bool
+
config USE_GENERIC_SMP_HELPERS
bool