Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

dma: contiguous: Reserve default CMA heap

The CMA code, in addition to the reserved-memory regions in the device
tree, will also register a default CMA region if the device tree doesn't
provide any, with its size and position coming from either the kernel
command-line or configuration.

Let's register that one for use to create a heap for it.

Reviewed-by: T.J. Mercier <tjmercier@google.com>
Signed-off-by: Maxime Ripard <mripard@kernel.org>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
Link: https://lore.kernel.org/r/20251013-dma-buf-ecc-heap-v8-4-04ce150ea3d9@kernel.org

authored by

Maxime Ripard and committed by
Sumit Semwal
8f1fc1bf 84a59306

+6
+6
kernel/dma/contiguous.c
··· 242 242 } 243 243 244 244 if (selected_size && !dma_contiguous_default_area) { 245 + int ret; 246 + 245 247 pr_debug("%s: reserving %ld MiB for global area\n", __func__, 246 248 (unsigned long)selected_size / SZ_1M); 247 249 ··· 251 249 selected_limit, 252 250 &dma_contiguous_default_area, 253 251 fixed); 252 + 253 + ret = dma_heap_cma_register_heap(dma_contiguous_default_area); 254 + if (ret) 255 + pr_warn("Couldn't register default CMA heap."); 254 256 } 255 257 } 256 258