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: Lu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Vasant Hegde <vasant.hegde@amd.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Signed-off-by: Jason Gunthorpe <jgg@ziepe.ca>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
This commit is contained in:
Jason Gunthorpe 2024-09-04 13:40:10 +01:00 committed by Russell King (Oracle)
parent 9e8354b399
commit e02fcd7377

View File

@ -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;