static void *arm_iommu_alloc_attrs(struct device *dev, size_t size,
dma_addr_t *handle, gfp_t gfp, struct dma_attrs *attrs)
{
- pgprot_t prot = __get_dma_pgprot(attrs, PAGE_KERNEL, true);
+ pgprot_t prot = __get_dma_pgprot(attrs, PAGE_KERNEL,
+ is_device_dma_coherent(dev));
struct page **pages;
void *addr = NULL;
unsigned long usize = vma->vm_end - vma->vm_start;
struct page **pages = __iommu_get_pages(cpu_addr, attrs);
- vma->vm_page_prot = __get_dma_pgprot(attrs, vma->vm_page_prot, true);
+ vma->vm_page_prot = __get_dma_pgprot(attrs, vma->vm_page_prot,
+ is_device_dma_coherent(dev));
if (!pages)
return -ENXIO;