summaryrefslogtreecommitdiff
path: root/include/linux/dma-direct.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2018-11-04 17:27:56 +0100
committerChristoph Hellwig <hch@lst.de>2018-12-01 17:55:02 +0100
commitb18814e767a445534ab9ccba02e82a31208f85d6 (patch)
tree7311d387b5e13abe09b3c9247d007c4efffc881e /include/linux/dma-direct.h
parentc9d76d0655c06b8c1f944e46c4fd9e9cf4b331c0 (diff)
dma-direct: provide page based alloc/free helpers
Some architectures support remapping highmem into DMA coherent allocations. To use the common code for them we need variants of dma_direct_{alloc,free}_pages that do not use kernel virtual addresses. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Diffstat (limited to 'include/linux/dma-direct.h')
-rw-r--r--include/linux/dma-direct.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/dma-direct.h b/include/linux/dma-direct.h
index 9e66bfe369aa..61b78f934f64 100644
--- a/include/linux/dma-direct.h
+++ b/include/linux/dma-direct.h
@@ -67,6 +67,9 @@ void *dma_direct_alloc_pages(struct device *dev, size_t size,
dma_addr_t *dma_handle, gfp_t gfp, unsigned long attrs);
void dma_direct_free_pages(struct device *dev, size_t size, void *cpu_addr,
dma_addr_t dma_addr, unsigned long attrs);
+struct page *__dma_direct_alloc_pages(struct device *dev, size_t size,
+ dma_addr_t *dma_handle, gfp_t gfp, unsigned long attrs);
+void __dma_direct_free_pages(struct device *dev, size_t size, struct page *page);
dma_addr_t dma_direct_map_page(struct device *dev, struct page *page,
unsigned long offset, size_t size, enum dma_data_direction dir,
unsigned long attrs);