diff options
| author | Linus Walleij <linus.walleij@linaro.org> | 2019-09-05 11:40:54 +0200 |
|---|---|---|
| committer | Linus Walleij <linus.walleij@linaro.org> | 2019-09-05 11:40:54 +0200 |
| commit | 151a41014bff92f353263cadc051435dc9c3258e (patch) | |
| tree | aa082a0745edd5b7051668f455dfc0ee1e4a9de0 /include/linux/dma-noncoherent.h | |
| parent | ae0755b56da9db4190288155ea884331993ed51b (diff) | |
| parent | 089cf7f6ecb266b6a4164919a2e69bd2f938374a (diff) | |
Merge tag 'v5.3-rc7' into devel
Linux 5.3-rc7
Diffstat (limited to 'include/linux/dma-noncoherent.h')
| -rw-r--r-- | include/linux/dma-noncoherent.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/include/linux/dma-noncoherent.h b/include/linux/dma-noncoherent.h index 3813211a9aad..0bff3d7fac92 100644 --- a/include/linux/dma-noncoherent.h +++ b/include/linux/dma-noncoherent.h @@ -42,13 +42,18 @@ void arch_dma_free(struct device *dev, size_t size, void *cpu_addr, dma_addr_t dma_addr, unsigned long attrs); long arch_dma_coherent_to_pfn(struct device *dev, void *cpu_addr, dma_addr_t dma_addr); - -#ifdef CONFIG_ARCH_HAS_DMA_MMAP_PGPROT pgprot_t arch_dma_mmap_pgprot(struct device *dev, pgprot_t prot, unsigned long attrs); + +#ifdef CONFIG_MMU +pgprot_t dma_pgprot(struct device *dev, pgprot_t prot, unsigned long attrs); #else -# define arch_dma_mmap_pgprot(dev, prot, attrs) pgprot_noncached(prot) -#endif +static inline pgprot_t dma_pgprot(struct device *dev, pgprot_t prot, + unsigned long attrs) +{ + return prot; /* no protection bits supported without page tables */ +} +#endif /* CONFIG_MMU */ #ifdef CONFIG_DMA_NONCOHERENT_CACHE_SYNC void arch_dma_cache_sync(struct device *dev, void *vaddr, size_t size, |
