aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/dma-map-ops.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2021-06-23 16:05:05 +0200
committerChristoph Hellwig <hch@lst.de>2021-08-18 16:24:11 +0200
commit39a2d3506b2d53c569a6db13d65b2f3728c4feec (patch)
treea28837a98a67beafc9ee020795ffc2d8efe0d107 /include/linux/dma-map-ops.h
parentdma-mapping: simplify dma_init_coherent_memory (diff)
downloadlinux-dev-39a2d3506b2d53c569a6db13d65b2f3728c4feec.tar.xz
linux-dev-39a2d3506b2d53c569a6db13d65b2f3728c4feec.zip
dma-mapping: add a dma_init_global_coherent helper
Add a new helper to initialize the global coherent pool. This both cleans up the existing initialization which indirects through the reserved_mem_ops that are normally only used for struct device, and also allows using the global pool for non-devicetree architectures. Signed-off-by: Christoph Hellwig <hch@lst.de> Tested-by: Dillon Min <dillon.minfei@gmail.com>
Diffstat (limited to 'include/linux/dma-map-ops.h')
-rw-r--r--include/linux/dma-map-ops.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/dma-map-ops.h b/include/linux/dma-map-ops.h
index 2f842498c448..068f1b11a6a4 100644
--- a/include/linux/dma-map-ops.h
+++ b/include/linux/dma-map-ops.h
@@ -177,7 +177,7 @@ void *dma_alloc_from_global_coherent(struct device *dev, ssize_t size,
int dma_release_from_global_coherent(int order, void *vaddr);
int dma_mmap_from_global_coherent(struct vm_area_struct *vma, void *cpu_addr,
size_t size, int *ret);
-
+int dma_init_global_coherent(phys_addr_t phys_addr, size_t size);
#else
static inline int dma_declare_coherent_memory(struct device *dev,
phys_addr_t phys_addr, dma_addr_t device_addr, size_t size)