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:
parent
9e8354b399
commit
e02fcd7377
@ -1585,9 +1585,11 @@ arm_iommu_create_mapping(struct device *dev, dma_addr_t base, u64 size)
|
|||||||
|
|
||||||
spin_lock_init(&mapping->lock);
|
spin_lock_init(&mapping->lock);
|
||||||
|
|
||||||
mapping->domain = iommu_domain_alloc(dev->bus);
|
mapping->domain = iommu_paging_domain_alloc(dev);
|
||||||
if (!mapping->domain)
|
if (IS_ERR(mapping->domain)) {
|
||||||
|
err = PTR_ERR(mapping->domain);
|
||||||
goto err4;
|
goto err4;
|
||||||
|
}
|
||||||
|
|
||||||
kref_init(&mapping->kref);
|
kref_init(&mapping->kref);
|
||||||
return mapping;
|
return mapping;
|
||||||
|
Loading…
Reference in New Issue
Block a user