]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - arch/arm64/mm/dma-mapping.c
Merge branches 'pm-core', 'pm-qos', 'pm-domains' and 'pm-opp'
[linux.git] / arch / arm64 / mm / dma-mapping.c
index e04082700bb16c3598333de72b3c64659be63e5e..4a14b25163fb067ee2c3e575a45a20a58481a434 100644 (file)
@@ -558,7 +558,7 @@ static void *__iommu_alloc_attrs(struct device *dev, size_t size,
                                 unsigned long attrs)
 {
        bool coherent = is_device_dma_coherent(dev);
-       int ioprot = dma_direction_to_prot(DMA_BIDIRECTIONAL, coherent);
+       int ioprot = dma_info_to_prot(DMA_BIDIRECTIONAL, coherent, attrs);
        size_t iosize = size;
        void *addr;
 
@@ -712,7 +712,7 @@ static dma_addr_t __iommu_map_page(struct device *dev, struct page *page,
                                   unsigned long attrs)
 {
        bool coherent = is_device_dma_coherent(dev);
-       int prot = dma_direction_to_prot(dir, coherent);
+       int prot = dma_info_to_prot(dir, coherent, attrs);
        dma_addr_t dev_addr = iommu_dma_map_page(dev, page, offset, size, prot);
 
        if (!iommu_dma_mapping_error(dev, dev_addr) &&
@@ -770,7 +770,7 @@ static int __iommu_map_sg_attrs(struct device *dev, struct scatterlist *sgl,
                __iommu_sync_sg_for_device(dev, sgl, nelems, dir);
 
        return iommu_dma_map_sg(dev, sgl, nelems,
-                       dma_direction_to_prot(dir, coherent));
+                               dma_info_to_prot(dir, coherent, attrs));
 }
 
 static void __iommu_unmap_sg_attrs(struct device *dev,
@@ -799,7 +799,6 @@ static struct dma_map_ops iommu_dma_ops = {
        .sync_sg_for_device = __iommu_sync_sg_for_device,
        .map_resource = iommu_dma_map_resource,
        .unmap_resource = iommu_dma_unmap_resource,
-       .dma_supported = iommu_dma_supported,
        .mapping_error = iommu_dma_mapping_error,
 };