Skip to content

Commit 7e72a8f

Browse files
mripardmszyprow
authored andcommitted
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 <tjmercier@google.com> Acked-by: David Hildenbrand (Arm) <david@kernel.org> 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-5-e18fda504419@kernel.org
1 parent 6207948 commit 7e72a8f

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

mm/cma.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ const char *cma_get_name(const struct cma *cma)
5252
{
5353
return cma->name;
5454
}
55+
EXPORT_SYMBOL_GPL(cma_get_name);
5556

5657
static unsigned long cma_bitmap_aligned_mask(const struct cma *cma,
5758
unsigned int align_order)
@@ -951,6 +952,7 @@ struct page *cma_alloc(struct cma *cma, unsigned long count,
951952

952953
return page;
953954
}
955+
EXPORT_SYMBOL_GPL(cma_alloc);
954956

955957
static struct cma_memrange *find_cma_memrange(struct cma *cma,
956958
const struct page *pages, unsigned long count)
@@ -1027,6 +1029,7 @@ bool cma_release(struct cma *cma, const struct page *pages,
10271029

10281030
return true;
10291031
}
1032+
EXPORT_SYMBOL_GPL(cma_release);
10301033

10311034
bool cma_release_frozen(struct cma *cma, const struct page *pages,
10321035
unsigned long count)

0 commit comments

Comments
 (0)