summaryrefslogtreecommitdiff
path: root/kernel/dma/Kconfig
diff options
context:
space:
mode:
authorYajun Deng <yajun.deng@linux.dev>2023-07-12 15:47:58 +0800
committerChristoph Hellwig <hch@lst.de>2023-07-31 17:54:29 +0200
commitbf29bfaa54901a4bdee2a18cd10eb951a884a5f9 (patch)
tree830ab38ee71ea12958a18cbaa6c145c729a6ab2f /kernel/dma/Kconfig
parent22e4a348f87c59df2c02f1efb7ba9a56b622c7b8 (diff)
dma-contiguous: support numa CMA for specified node
The kernel parameter 'cma_pernuma=' only supports reserving the same size of CMA area for each node. We need to reserve different sizes of CMA area for specified nodes if these devices belong to different nodes. Adding another kernel parameter 'numa_cma=' to reserve CMA area for the specified node. If we want to use one of these parameters, we need to enable DMA_NUMA_CMA. At the same time, print the node id in cma_declare_contiguous_nid() if CONFIG_NUMA is enabled. Signed-off-by: Yajun Deng <yajun.deng@linux.dev> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'kernel/dma/Kconfig')
-rw-r--r--kernel/dma/Kconfig9
1 files changed, 5 insertions, 4 deletions
diff --git a/kernel/dma/Kconfig b/kernel/dma/Kconfig
index 7afde9bc529f..562463fe30ea 100644
--- a/kernel/dma/Kconfig
+++ b/kernel/dma/Kconfig
@@ -145,15 +145,16 @@ config DMA_CMA
if DMA_CMA
-config DMA_PERNUMA_CMA
- bool "Enable separate DMA Contiguous Memory Area for each NUMA Node"
+config DMA_NUMA_CMA
+ bool "Enable separate DMA Contiguous Memory Area for NUMA Node"
default NUMA
help
- Enable this option to get pernuma CMA areas so that NUMA devices
+ 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"
- on the kernel's command line.
+ or set the node id and its size of CMA by specifying "numa_cma=
+ <node>:size[,<node>:size]" on the kernel's command line.
comment "Default contiguous memory area size:"