[PATCH v2 4/9] mm: cma: Export dev_get_cma_area()

Maxime Ripard posted 9 patches 1 month, 1 week ago
There is a newer version of this series
[PATCH v2 4/9] mm: cma: Export dev_get_cma_area()
Posted by Maxime Ripard 1 month, 1 week ago
The CMA dma-buf heap uses the dev_get_cma_area() function to retrieve
the default contiguous area.

Now that this function is no longer inlined, and since we want to turn
the CMA heap into a module, let's export it.

Signed-off-by: Maxime Ripard <mripard@kernel.org>
---
 kernel/dma/contiguous.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/kernel/dma/contiguous.c b/kernel/dma/contiguous.c
index a4279d800d4658bf1c33b9b1da100eee1367d42f..ad50512d71d3088a73e4b1ac02d6e6122374888e 100644
--- a/kernel/dma/contiguous.c
+++ b/kernel/dma/contiguous.c
@@ -106,10 +106,11 @@ struct cma *dev_get_cma_area(struct device *dev)
 	if (dev && dev->cma_area)
 		return dev->cma_area;
 
 	return dma_contiguous_default_area;
 }
+EXPORT_SYMBOL_GPL(dev_get_cma_area);
 
 #ifdef CONFIG_DMA_NUMA_CMA
 
 static struct cma *dma_contiguous_numa_area[MAX_NUMNODES];
 static phys_addr_t numa_cma_size[MAX_NUMNODES] __initdata;

-- 
2.53.0
Re: [PATCH v2 4/9] mm: cma: Export dev_get_cma_area()
Posted by David Hildenbrand (Arm) 1 month, 1 week ago
On 2/27/26 14:15, Maxime Ripard wrote:
> The CMA dma-buf heap uses the dev_get_cma_area() function to retrieve
> the default contiguous area.
> 
> Now that this function is no longer inlined, and since we want to turn
> the CMA heap into a module, let's export it.
> 
> Signed-off-by: Maxime Ripard <mripard@kernel.org>
> ---
>  kernel/dma/contiguous.c | 1 +

The prefix of the patch should likely not be "mm: cma: " :)

-- 
Cheers,

David