Commit e02fcd73 authored by Jason Gunthorpe's avatar Jason Gunthorpe Committed by Russell King (Oracle)
Browse files

ARM: 9418/1: dma-mapping: Use iommu_paging_domain_alloc()



Since arm_iommu_create_mapping() now accepts the device, let's replace
iommu_domain_alloc() with iommu_paging_domain_alloc() to retire the former.

Signed-off-by: default avatarLu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: default avatarJason Gunthorpe <jgg@nvidia.com>
Reviewed-by: default avatarVasant Hegde <vasant.hegde@amd.com>
Acked-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Acked-by: default avatarJeff Johnson <quic_jjohnson@quicinc.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@ziepe.ca>
Signed-off-by: default avatarRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
parent 9e8354b3
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -1585,9 +1585,11 @@ arm_iommu_create_mapping(struct device *dev, dma_addr_t base, u64 size)

	spin_lock_init(&mapping->lock);

	mapping->domain = iommu_domain_alloc(dev->bus);
	if (!mapping->domain)
	mapping->domain = iommu_paging_domain_alloc(dev);
	if (IS_ERR(mapping->domain)) {
		err = PTR_ERR(mapping->domain);
		goto err4;
	}

	kref_init(&mapping->kref);
	return mapping;