mirror of
https://github.com/torvalds/linux.git
synced 2026-11-26 00:12:52 +00:00
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 <[email protected]> Signed-off-by: Kyungmin Park <[email protected]> CC: Michal Nazarewicz <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Tested-by: Rob Clark <[email protected]> Tested-by: Ohad Ben-Cohen <[email protected]> Tested-by: Benjamin Gaignard <[email protected]> Tested-by: Robert Nelson <[email protected]> Tested-by: Barry Song <[email protected]>
16 lines
262 B
C
16 lines
262 B
C
#ifndef ASMARM_DMA_CONTIGUOUS_H
|
|
#define ASMARM_DMA_CONTIGUOUS_H
|
|
|
|
#ifdef __KERNEL__
|
|
#ifdef CONFIG_CMA
|
|
|
|
#include <linux/types.h>
|
|
#include <asm-generic/dma-contiguous.h>
|
|
|
|
void dma_contiguous_early_fixup(phys_addr_t base, unsigned long size);
|
|
|
|
#endif
|
|
#endif
|
|
|
|
#endif
|