mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2024-12-29 17:23:36 +00:00
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);
|
||||
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user