Merge tag 'dma-mapping-4.20-1' of git://git.infradead.org/users/hch/dma-mapping
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 26 Oct 2018 18:29:17 +0000 (11:29 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 26 Oct 2018 18:29:17 +0000 (11:29 -0700)
Pull more dma-mapping updates from Christoph Hellwig:

 - various swiotlb cleanups

 - do not dip into the Ń•wiotlb pool for dma coherent allocations

 - add support for not cache coherent DMA to swiotlb

 - switch ARM64 to use the generic swiotlb_dma_ops

* tag 'dma-mapping-4.20-1' of git://git.infradead.org/users/hch/dma-mapping:
  arm64: use the generic swiotlb_dma_ops
  swiotlb: add support for non-coherent DMA
  swiotlb: don't dip into swiotlb pool for coherent allocations
  swiotlb: refactor swiotlb_map_page
  swiotlb: use swiotlb_map_page in swiotlb_map_sg_attrs
  swiotlb: merge swiotlb_unmap_page and unmap_single
  swiotlb: remove the overflow buffer
  swiotlb: do not panic on mapping failures
  swiotlb: mark is_swiotlb_buffer static
  swiotlb: remove a pointless comment

1  2 
arch/arm64/Kconfig
arch/arm64/mm/dma-mapping.c

Simple merge
@@@ -709,11 -548,11 +548,11 @@@ static void __iommu_sync_single_for_cpu
  {
        phys_addr_t phys;
  
-       if (is_device_dma_coherent(dev))
+       if (dev_is_dma_coherent(dev))
                return;
  
 -      phys = iommu_iova_to_phys(iommu_get_domain_for_dev(dev), dev_addr);
 +      phys = iommu_iova_to_phys(iommu_get_dma_domain(dev), dev_addr);
-       __dma_unmap_area(phys_to_virt(phys), size, dir);
+       arch_sync_dma_for_cpu(dev, phys, size, dir);
  }
  
  static void __iommu_sync_single_for_device(struct device *dev,
  {
        phys_addr_t phys;
  
-       if (is_device_dma_coherent(dev))
+       if (dev_is_dma_coherent(dev))
                return;
  
 -      phys = iommu_iova_to_phys(iommu_get_domain_for_dev(dev), dev_addr);
 +      phys = iommu_iova_to_phys(iommu_get_dma_domain(dev), dev_addr);
-       __dma_map_area(phys_to_virt(phys), size, dir);
+       arch_sync_dma_for_device(dev, phys, size, dir);
  }
  
  static dma_addr_t __iommu_map_page(struct device *dev, struct page *page,