CONFIG_NO_DMA
CONFIG_HAS_DMA
- Depends on
!NO_DMA
CONFIG_DMA_OPS_HELPERS
CONFIG_DMA_OPS_BYPASS
CONFIG_ARCH_HAS_DMA_MAP_DIRECT
CONFIG_NEED_SG_DMA_FLAGS
CONFIG_NEED_SG_DMA_LENGTH
CONFIG_NEED_DMA_MAP_STATE
CONFIG_ARCH_DMA_ADDR_T_64BIT
CONFIG_ARCH_HAS_DMA_SET_MASK
CONFIG_ARCH_HAS_DMA_WRITE_COMBINE
CONFIG_DMA_DECLARE_COHERENT
CONFIG_ARCH_HAS_SETUP_DMA_OPS
CONFIG_ARCH_HAS_TEARDOWN_DMA_OPS
CONFIG_ARCH_HAS_SYNC_DMA_FOR_DEVICE
CONFIG_ARCH_HAS_SYNC_DMA_FOR_CPU
- Selects
NEED_DMA_MAP_STATE
CONFIG_ARCH_HAS_SYNC_DMA_FOR_CPU_ALL
CONFIG_ARCH_HAS_DMA_PREP_COHERENT
CONFIG_ARCH_HAS_FORCE_DMA_UNENCRYPTED
CONFIG_ARCH_HAS_BATCHED_DMA_SYNC
CONFIG_ARCH_DMA_DEFAULT_COHERENT
CONFIG_SWIOTLB
- Selects
NEED_DMA_MAP_STATE
CONFIG_SWIOTLB_DEFAULT_SIZE_MB Default SWIOTLB bounce buffer size in MB
Sets the default size of the software IO TLB (SWIOTLB) bounce buffer pool allocated at boot time. The default is 64 MB.
On memory-constrained embedded or mobile platforms (e.g., those with a hardware IOMMU such as ARM SMMU covering most DMA-capable devices), a smaller value such as 4 or 8 MB may be sufficient. The SWIOTLB is then only needed for devices that bypass the IOMMU or have restricted DMA address ranges.
The minimum allowed value is 1 MB. This compile-time default can be overridden at runtime using the "swiotlb=<nslabs>" kernel command line parameter. Refer to Documentation/admin-guide/kernel-parameters.txt for details.
If unsure, leave at the default value of 64.
CONFIG_SWIOTLB_DYNAMIC Dynamic allocation of DMA bounce buffers
This enables dynamic resizing of the software IO TLB. The kernel starts with one memory pool at boot and it will allocate additional pools as needed. To reduce run-time kernel memory requirements, you may have to specify a smaller size of the initial pool using "swiotlb=" on the kernel command line.
If unsure, say N.
- Depends on
SWIOTLB
CONFIG_DMA_BOUNCE_UNALIGNED_KMALLOC
- Depends on
SWIOTLB
CONFIG_DMA_NEED_SYNC
CONFIG_DMA_RESTRICTED_POOL DMA Restricted Pool
This enables support for restricted DMA pools which provide a level of DMA memory protection on systems with limited hardware protection capabilities, such as those lacking an IOMMU.
For more information see <Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt> and <kernel/dma/swiotlb.c>. If unsure, say "n".
- Depends on
OF && OF_RESERVED_MEM && SWIOTLB
CONFIG_DMA_NONCOHERENT_MMAP
CONFIG_DMA_COHERENT_POOL
- Selects
GENERIC_ALLOCATOR
CONFIG_DMA_GLOBAL_POOL
- Depends on
!ARCH_HAS_DMA_SET_UNCACHED && !DMA_DIRECT_REMAP - Selects
DMA_DECLARE_COHERENT if !ARCH_HAS_DMA_SET_UNCACHED && !DMA_DIRECT_REMAP
CONFIG_DMA_DIRECT_REMAP
- Selects
DMA_COHERENT_POOL - Selects
DMA_NONCOHERENT_MMAP
CONFIG_ARCH_HAS_DMA_ALLOC
- Depends on
!ARCH_HAS_DMA_SET_UNCACHED && !DMA_DIRECT_REMAP && !DMA_GLOBAL_POOL
CONFIG_DMA_CMA DMA Contiguous Memory Allocator
This enables the Contiguous Memory Allocator which allows drivers to allocate big physically-contiguous blocks of memory for use with hardware components that do not support I/O map nor scatter-gather.
You can disable CMA by specifying "cma=0" on the kernel's command line.
For more information see <kernel/dma/contiguous.c>. If unsure, say "n".
- Depends on
HAVE_DMA_CONTIGUOUS && CMA
If DMA_CMA
CONFIG_DMA_NUMA_CMA Enable separate DMA Contiguous Memory Area for NUMA Node
Enable this option to get numa CMA areas so that NUMA devices can get local memory by DMA coherent APIs.
You can set the size of pernuma CMA by specifying "cma_pernuma=size" or set the node id and its size of CMA by specifying "numa_cma= <node>:size[,<node>:size]" on the kernel's command line. And in rare case that the above 2 are both setup, then the "numa_cma=" takes priority for the specified numa nodes.
- Depends on
DMA_CMA &&
If DMA_NUMA_CMA
CONFIG_CMA_SIZE_PERNUMA Default CMA area per NUMA node
On systems with more than one NUMA node, the selected CMA area size will be also allocated on each additional node, so that most devices may have benefit from better DMA locality without an explicit command-line opt-in.
- Depends on
DMA_CMA && DMA_NUMA_CMA
Default contiguous memory area size:
CONFIG_CMA_SIZE_MBYTES Size in Mega Bytes
Defines the size (in MiB) of the default memory area for Contiguous Memory Allocator. If the size of 0 is selected, CMA is disabled by default, but it can be enabled by passing cma=size[MG] to the kernel.
- Depends on
DMA_CMA && !CMA_SIZE_SEL_PERCENTAGE
CONFIG_CMA_SIZE_PERCENTAGE Percentage of total memory
Defines the size of the default memory area for Contiguous Memory Allocator as a percentage of the total memory in the system. If 0 percent is selected, CMA is disabled by default, but it can be enabled by passing cma=size[MG] to the kernel.
- Depends on
DMA_CMA && !CMA_SIZE_SEL_MBYTES
Selected region size
CONFIG_CMA_SIZE_SEL_MBYTES Use mega bytes value only
CONFIG_CMA_SIZE_SEL_PERCENTAGE Use percentage value only
CONFIG_CMA_SIZE_SEL_MIN Use lower value (minimum)
CONFIG_CMA_SIZE_SEL_MAX Use higher value (maximum)
CONFIG_CMA_ALIGNMENT Maximum PAGE_SIZE order of alignment for contiguous buffers
DMA mapping framework by default aligns all buffers to the smallest PAGE_SIZE order which is greater than or equal to the requested buffer size. This works well for buffers up to a few hundreds kilobytes, but for larger buffers it just a memory waste. With this parameter you can specify the maximum PAGE_SIZE order for contiguous buffers. Larger buffers will be aligned only to this specified order. The order is expressed as a power of two multiplied by the PAGE_SIZE.
For example, if your system defaults to 4KiB pages, the order value of 8 means that the buffers will be aligned up to 1MiB only.
If unsure, leave the default value "8".
- Range
[2 12] if DMA_CMA
CONFIG_DMA_API_DEBUG Enable debugging of DMA-API usage
Enable this option to debug the use of the DMA API by device drivers. With this option you will be able to detect common bugs in device drivers like double-freeing of DMA mappings or freeing mappings that were never allocated.
This option causes a performance degradation. Use only if you want to debug device drivers and dma interactions.
If unsure, say N.
- Selects
NEED_DMA_MAP_STATE
CONFIG_DMA_MAP_BENCHMARK Enable benchmarking of streaming DMA mapping
Provides /sys/kernel/debug/dma_map_benchmark that helps with testing performance of dma_(un)map_page.
See tools/testing/selftests/dma/dma_map_benchmark.c
- Depends on
DEBUG_FS
- arch/alpha/Kconfig:89
- arch/arc/Kconfig:70
- arch/arm/Kconfig:319
- arch/arm64/Kconfig:278
- arch/csky/Kconfig:160
- arch/hexagon/Kconfig:57
- arch/loongarch/Kconfig:787
- arch/m68k/Kconfig:84
- arch/microblaze/Kconfig:93
- arch/mips/Kconfig:3046
- arch/nios2/Kconfig:69
- arch/openrisc/Kconfig:54
- arch/parisc/Kconfig:106
- arch/powerpc/Kconfig:30
- arch/riscv/Kconfig:292
- arch/s390/Kconfig:2
- arch/sh/mm/Kconfig:4
- arch/sparc/Kconfig:140
- arch/um/Kconfig:52
- arch/x86/Kconfig:356
- arch/xtensa/Kconfig:94