aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/dma-mapping.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2019-06-03 09:14:31 +0200
committerChristoph Hellwig <hch@lst.de>2019-09-04 11:13:20 +0200
commit5cf4537975bbd5691b9ddd015d540bb92f61e322 (patch)
treef77c8831902447d5c079eb8d36d4819d426d6e06 /include/linux/dma-mapping.h
parentdma-mapping: always use VM_DMA_COHERENT for generic DMA remap (diff)
downloadwireguard-linux-5cf4537975bbd5691b9ddd015d540bb92f61e322.tar.xz
wireguard-linux-5cf4537975bbd5691b9ddd015d540bb92f61e322.zip
dma-mapping: introduce a dma_common_find_pages helper
A helper to find the backing page array based on a virtual address. This also ensures we do the same vm_flags check everywhere instead of slightly different or missing ones in a few places. Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'include/linux/dma-mapping.h')
-rw-r--r--include/linux/dma-mapping.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h
index 86223bc24d82..746fa5d6850c 100644
--- a/include/linux/dma-mapping.h
+++ b/include/linux/dma-mapping.h
@@ -626,6 +626,7 @@ extern int dma_common_mmap(struct device *dev, struct vm_area_struct *vma,
void *cpu_addr, dma_addr_t dma_addr, size_t size,
unsigned long attrs);
+struct page **dma_common_find_pages(void *cpu_addr);
void *dma_common_contiguous_remap(struct page *page, size_t size,
pgprot_t prot, const void *caller);