summaryrefslogtreecommitdiff
path: root/drivers/base/dma-contiguous.c
AgeCommit message (Collapse)Author
2012-06-22cma: Fix CMA checkpatch warningsSubramaniam Chanderashekarapuram
This patch fixes checkpatch warnings existing in the cma patchset as of v3.4_rc5. This is maintained as an incremental patch on top of the original cma patchset to facilitate tracking cma patches. Signed-off-by: Subramaniam Chanderashekarapuram <subramaniam.ca@ti.com>
2012-04-20drivers: add Contiguous Memory AllocatorMarek Szyprowski
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>