]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
dma-mapping: move CONFIG_DMA_CMA to kernel/dma/Kconfig
authorChristoph Hellwig <hch@lst.de>
Wed, 13 Feb 2019 18:19:08 +0000 (19:19 +0100)
committerChristoph Hellwig <hch@lst.de>
Wed, 20 Feb 2019 14:27:00 +0000 (07:27 -0700)
This is where all the related code already lives.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/Kconfig
kernel/dma/Kconfig

index 3e63a900b330e9b40f934ffe4a9814c79daacb4a..059700ea352170bb10d3adc8a464744bc9dd8f51 100644 (file)
@@ -191,83 +191,6 @@ config DMA_FENCE_TRACE
          lockup related problems for dma-buffers shared across multiple
          devices.
 
-config DMA_CMA
-       bool "DMA Contiguous Memory Allocator"
-       depends on HAVE_DMA_CONTIGUOUS && CMA
-       help
-         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 <include/linux/dma-contiguous.h>.
-         If unsure, say "n".
-
-if  DMA_CMA
-comment "Default contiguous memory area size:"
-
-config CMA_SIZE_MBYTES
-       int "Size in Mega Bytes"
-       depends on !CMA_SIZE_SEL_PERCENTAGE
-       default 0 if X86
-       default 16
-       help
-         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.
-
-
-config CMA_SIZE_PERCENTAGE
-       int "Percentage of total memory"
-       depends on !CMA_SIZE_SEL_MBYTES
-       default 0 if X86
-       default 10
-       help
-         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.
-
-choice
-       prompt "Selected region size"
-       default CMA_SIZE_SEL_MBYTES
-
-config CMA_SIZE_SEL_MBYTES
-       bool "Use mega bytes value only"
-
-config CMA_SIZE_SEL_PERCENTAGE
-       bool "Use percentage value only"
-
-config CMA_SIZE_SEL_MIN
-       bool "Use lower value (minimum)"
-
-config CMA_SIZE_SEL_MAX
-       bool "Use higher value (maximum)"
-
-endchoice
-
-config CMA_ALIGNMENT
-       int "Maximum PAGE_SIZE order of alignment for contiguous buffers"
-       range 4 12
-       default 8
-       help
-         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".
-
-endif
-
 config GENERIC_ARCH_TOPOLOGY
        bool
        help
index 24d45c78c6711658becd3ad5e82e01a4d80c03a4..212aac7c675fce02417d15af14318721a0471268 100644 (file)
@@ -60,6 +60,83 @@ config DMA_DIRECT_REMAP
        bool
        select DMA_REMAP
 
+config DMA_CMA
+       bool "DMA Contiguous Memory Allocator"
+       depends on HAVE_DMA_CONTIGUOUS && CMA
+       help
+         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 <include/linux/dma-contiguous.h>.
+         If unsure, say "n".
+
+if  DMA_CMA
+comment "Default contiguous memory area size:"
+
+config CMA_SIZE_MBYTES
+       int "Size in Mega Bytes"
+       depends on !CMA_SIZE_SEL_PERCENTAGE
+       default 0 if X86
+       default 16
+       help
+         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.
+
+
+config CMA_SIZE_PERCENTAGE
+       int "Percentage of total memory"
+       depends on !CMA_SIZE_SEL_MBYTES
+       default 0 if X86
+       default 10
+       help
+         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.
+
+choice
+       prompt "Selected region size"
+       default CMA_SIZE_SEL_MBYTES
+
+config CMA_SIZE_SEL_MBYTES
+       bool "Use mega bytes value only"
+
+config CMA_SIZE_SEL_PERCENTAGE
+       bool "Use percentage value only"
+
+config CMA_SIZE_SEL_MIN
+       bool "Use lower value (minimum)"
+
+config CMA_SIZE_SEL_MAX
+       bool "Use higher value (maximum)"
+
+endchoice
+
+config CMA_ALIGNMENT
+       int "Maximum PAGE_SIZE order of alignment for contiguous buffers"
+       range 4 12
+       default 8
+       help
+         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".
+
+endif
+
 config DMA_API_DEBUG
        bool "Enable debugging of DMA-API usage"
        select NEED_DMA_MAP_STATE