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.
Showing the changes to include/linux (1 of 4 files). Show all
Unified · Split
| @@ -626,6 +626,7 @@ extern int dma_common_mmap(struct device *dev, struct vm_area_struct *vma, · 625 unmodified lines | ||
| 626 | 626 | void *cpu_addr, dma_addr_t dma_addr, size_t size, |
| 627 | 627 | unsigned long attrs); |
| 628 | 628 | |
| 629 | +struct page **dma_common_find_pages(void *cpu_addr); | |
| 629 | 630 | void *dma_common_contiguous_remap(struct page *page, size_t size, |
| 630 | 631 | pgprot_t prot, const void *caller); |
| 631 | 632 | |