Kconfig

CONFIG_NO_DMA

Unknown

CONFIG_DMA_OPS_HELPERS

On

CONFIG_DMA_OPS_BYPASS

Unknown

CONFIG_ARCH_HAS_DMA_MAP_DIRECT

Unknown

CONFIG_NEED_SG_DMA_FLAGS

On

CONFIG_NEED_SG_DMA_LENGTH

On

CONFIG_NEED_DMA_MAP_STATE

On

CONFIG_ARCH_HAS_DMA_SET_MASK

Unknown

CONFIG_ARCH_HAS_DMA_WRITE_COMBINE

Unknown

CONFIG_DMA_DECLARE_COHERENT

On

CONFIG_ARCH_HAS_SETUP_DMA_OPS

Unknown

CONFIG_ARCH_HAS_TEARDOWN_DMA_OPS

Unknown

CONFIG_ARCH_HAS_SYNC_DMA_FOR_DEVICE

Unknown

CONFIG_ARCH_HAS_SYNC_DMA_FOR_CPU_ALL

Unknown

CONFIG_ARCH_HAS_DMA_PREP_COHERENT

Unknown

CONFIG_ARCH_HAS_FORCE_DMA_UNENCRYPTED

On

CONFIG_ARCH_HAS_BATCHED_DMA_SYNC

Unknown

CONFIG_ARCH_DMA_DEFAULT_COHERENT

Unknown

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

On

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.

CONFIG_DMA_BOUNCE_UNALIGNED_KMALLOC

Unknown

CONFIG_DMA_NONCOHERENT_MMAP

Unknown
Default
  • y if !

CONFIG_DMA_CMA DMA Contiguous Memory Allocator

On

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".

If DMA_CMA

CONFIG_DMA_NUMA_CMA Enable separate DMA Contiguous Memory Area for NUMA Node

On

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.

If DMA_NUMA_CMA

CONFIG_CMA_SIZE_PERNUMA Default CMA area per NUMA node

On

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.

Default contiguous memory area size:

CONFIG_CMA_SIZE_PERCENTAGE Percentage of total memory

Unknown

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.

Selected region size

CONFIG_CMA_SIZE_SEL_MBYTES Use mega bytes value only

On

CONFIG_CMA_SIZE_SEL_PERCENTAGE Use percentage value only

Off

CONFIG_CMA_SIZE_SEL_MIN Use lower value (minimum)

Off

CONFIG_CMA_SIZE_SEL_MAX Use higher value (maximum)

Off
End of Selected region size

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".

CONFIG_DMA_API_DEBUG Enable debugging of DMA-API usage

On

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.

CONFIG_DMA_MAP_BENCHMARK Enable benchmarking of streaming DMA mapping

On

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