From: Maxime Ripard Date: Tue, 31 Mar 2026 10:00:14 +0000 (+0200) Subject: mm: cma: Export cma_alloc(), cma_release() and cma_get_name() X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7e72a8f8bb0d5ba89027d64e3e2aad1984d2e20d;p=thirdparty%2Fkernel%2Flinux.git mm: cma: Export cma_alloc(), cma_release() and cma_get_name() The CMA dma-buf heap uses cma_alloc() and cma_release() to allocate and free, respectively, its CMA buffers, and cma_get_name() to get the name of the heap instance it's going to create. However, these functions are not exported. Since we want to turn the CMA heap into a module, let's export them both. Reviewed-by: T.J. Mercier Acked-by: David Hildenbrand (Arm) Signed-off-by: Maxime Ripard Signed-off-by: Marek Szyprowski Link: https://lore.kernel.org/r/20260331-dma-buf-heaps-as-modules-v4-5-e18fda504419@kernel.org --- diff --git a/mm/cma.c b/mm/cma.c index 94b5da468a7d7..550effb9c4e01 100644 --- a/mm/cma.c +++ b/mm/cma.c @@ -52,6 +52,7 @@ const char *cma_get_name(const struct cma *cma) { return cma->name; } +EXPORT_SYMBOL_GPL(cma_get_name); static unsigned long cma_bitmap_aligned_mask(const struct cma *cma, unsigned int align_order) @@ -951,6 +952,7 @@ struct page *cma_alloc(struct cma *cma, unsigned long count, return page; } +EXPORT_SYMBOL_GPL(cma_alloc); static struct cma_memrange *find_cma_memrange(struct cma *cma, const struct page *pages, unsigned long count) @@ -1027,6 +1029,7 @@ bool cma_release(struct cma *cma, const struct page *pages, return true; } +EXPORT_SYMBOL_GPL(cma_release); bool cma_release_frozen(struct cma *cma, const struct page *pages, unsigned long count)