mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
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
This commit is contained in:
committed by
Marek Szyprowski
parent
6207948f38
commit
7e72a8f8bb
3
mm/cma.c
3
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)
|
||||
|
||||
Reference in New Issue
Block a user