]> git.baikalelectronics.ru Git - kernel.git/commit
drivers: add Contiguous Memory Allocator
authorMarek Szyprowski <m.szyprowski@samsung.com>
Thu, 29 Dec 2011 12:09:51 +0000 (13:09 +0100)
committerMarek Szyprowski <m.szyprowski@samsung.com>
Mon, 21 May 2012 13:09:37 +0000 (15:09 +0200)
commitd51173a61e72dcf5c43f5c04587ab0b2f0c1d61f
treed0720eda4a440ff91f3296b0f90cc53ac514d4b9
parent3e0bdf23c2716def9c094b6b18e8020efdd9ffc0
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.

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>
Documentation/kernel-parameters.txt
arch/Kconfig
drivers/base/Kconfig
drivers/base/Makefile
drivers/base/dma-contiguous.c [new file with mode: 0644]
include/asm-generic/dma-contiguous.h [new file with mode: 0644]
include/linux/device.h
include/linux/dma-contiguous.h [new file with mode: 0644]