]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
dma: contiguous: Turn heap registration logic around
authorMaxime Ripard <mripard@kernel.org>
Tue, 31 Mar 2026 10:00:10 +0000 (12:00 +0200)
committerMarek Szyprowski <m.szyprowski@samsung.com>
Tue, 31 Mar 2026 11:27:20 +0000 (13:27 +0200)
commit25bd73562941b04cfba1a278d8c84f2b1c69b8e9
tree3a02911ae2bdbbf0407f143c1622d5716c88f58f
parent6de23f81a5e08be8fbf5e8d7e9febc72a5b5f27f
dma: contiguous: Turn heap registration logic around

The CMA heap instantiation was initially developed by having the
contiguous DMA code call into the CMA heap to create a new instance
every time a reserved memory area is probed.

Turning the CMA heap into a module would create a dependency of the
kernel on a module, which doesn't work.

Let's turn the logic around and do the opposite: store all the reserved
memory CMA regions into the contiguous DMA code, and provide an iterator
for the heap to use when it probes.

Signed-off-by: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Link: https://lore.kernel.org/r/20260331-dma-buf-heaps-as-modules-v4-1-e18fda504419@kernel.org
drivers/dma-buf/heaps/cma_heap.c
include/linux/dma-buf/heaps/cma.h [deleted file]
include/linux/dma-map-ops.h
kernel/dma/contiguous.c