summaryrefslogtreecommitdiffstats
path: root/include/linux/cma.h
diff options
context:
space:
mode:
authorLaura Abbott <labbott@redhat.com>2017-04-18 11:27:04 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-04-18 20:41:12 +0200
commite4231bcda72daef497af45e195a33daa0f9357d0 (patch)
treeb07421594e284d0c33e310d43d857fc67aeb8c88 /include/linux/cma.h
parentf318dd083c8128c50e48ceb8c3e812e52800fc4f (diff)
downloadblackbird-op-linux-e4231bcda72daef497af45e195a33daa0f9357d0.tar.gz
blackbird-op-linux-e4231bcda72daef497af45e195a33daa0f9357d0.zip
cma: Introduce cma_for_each_area
Frameworks (e.g. Ion) may want to iterate over each possible CMA area to allow for enumeration. Introduce a function to allow a callback. Signed-off-by: Laura Abbott <labbott@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/cma.h')
-rw-r--r--include/linux/cma.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/cma.h b/include/linux/cma.h
index d41d1f8d1e28..3e8fbf5a5c73 100644
--- a/include/linux/cma.h
+++ b/include/linux/cma.h
@@ -34,4 +34,6 @@ extern int cma_init_reserved_mem(phys_addr_t base, phys_addr_t size,
extern struct page *cma_alloc(struct cma *cma, size_t count, unsigned int align,
gfp_t gfp_mask);
extern bool cma_release(struct cma *cma, const struct page *pages, unsigned int count);
+
+extern int cma_for_each_area(int (*it)(struct cma *cma, void *data), void *data);
#endif
OpenPOWER on IntegriCloud