diff options
author | Christoph Hellwig <hch@lst.de> | 2019-02-13 08:01:29 +0100 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2019-02-18 12:41:04 +0100 |
commit | 461db2bdbf3c978e76dd10a04a63fa06bb29114f (patch) | |
tree | 40cb4af74482f83549335f9d35f404bb1277b459 /arch/powerpc/kernel/dma-iommu.c | |
parent | powerpc/dma: use the dma-direct allocator for coherent platforms (diff) | |
download | linux-461db2bdbf3c978e76dd10a04a63fa06bb29114f.tar.xz linux-461db2bdbf3c978e76dd10a04a63fa06bb29114f.zip |
powerpc/dma: use the dma_direct mapping routines
Switch the streaming DMA mapping and ownership transfer methods to the
functionally identical dma_direct_ versions. Factor the cache
maintainance helpers into the form expected by the common code for that.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Tested-by: Christian Zigotzky <chzigotzky@xenosoft.de>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/kernel/dma-iommu.c')
-rw-r--r-- | arch/powerpc/kernel/dma-iommu.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/dma-iommu.c b/arch/powerpc/kernel/dma-iommu.c index c75ba4e3a50c..09231ef06d01 100644 --- a/arch/powerpc/kernel/dma-iommu.c +++ b/arch/powerpc/kernel/dma-iommu.c @@ -68,7 +68,7 @@ static dma_addr_t dma_iommu_map_page(struct device *dev, struct page *page, unsigned long attrs) { if (dma_iommu_map_bypass(dev, attrs)) - return dma_nommu_map_page(dev, page, offset, size, direction, + return dma_direct_map_page(dev, page, offset, size, direction, attrs); return iommu_map_page(dev, get_iommu_table_base(dev), page, offset, size, device_to_mask(dev), direction, attrs); @@ -90,7 +90,7 @@ static int dma_iommu_map_sg(struct device *dev, struct scatterlist *sglist, unsigned long attrs) { if (dma_iommu_map_bypass(dev, attrs)) - return dma_nommu_map_sg(dev, sglist, nelems, direction, attrs); + return dma_direct_map_sg(dev, sglist, nelems, direction, attrs); return ppc_iommu_map_sg(dev, get_iommu_table_base(dev), sglist, nelems, device_to_mask(dev), direction, attrs); } |