summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNicolas Saenz Julienne <nsaenzjulienne@suse.de>2020-07-14 15:39:25 +0300
committerChristoph Hellwig <hch@lst.de>2020-07-14 16:42:24 +0300
commit567f6a6eba0c09e5f502e0290e57651befa8aacb (patch)
treeffc1568d007cbdfb6740ecac29c11d0e1d3f1d20 /include
parent0dc589da873b58b70f4caf4b070fb0cf70fdd1dc (diff)
downloadlinux-567f6a6eba0c09e5f502e0290e57651befa8aacb.tar.xz
dma-direct: provide function to check physical memory area validity
dma_coherent_ok() checks if a physical memory area fits a device's DMA constraints. Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'include')
-rw-r--r--include/linux/dma-direct.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/dma-direct.h b/include/linux/dma-direct.h
index 5184735a0fe8..ab2e20cba951 100644
--- a/include/linux/dma-direct.h
+++ b/include/linux/dma-direct.h
@@ -69,6 +69,7 @@ static inline bool dma_capable(struct device *dev, dma_addr_t addr, size_t size,
u64 dma_direct_get_required_mask(struct device *dev);
gfp_t dma_direct_optimal_gfp_mask(struct device *dev, u64 dma_mask,
u64 *phys_mask);
+bool dma_coherent_ok(struct device *dev, phys_addr_t phys, size_t size);
void *dma_direct_alloc(struct device *dev, size_t size, dma_addr_t *dma_handle,
gfp_t gfp, unsigned long attrs);
void dma_direct_free(struct device *dev, size_t size, void *cpu_addr,