Skip to content

Commit e02fcd7

Browse files
jgunthorpeRussell King (Oracle)
authored andcommitted
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 <[email protected]> Reviewed-by: Jason Gunthorpe <[email protected]> Reviewed-by: Vasant Hegde <[email protected]> Acked-by: Michael S. Tsirkin <[email protected]> Acked-by: Jeff Johnson <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]> Signed-off-by: Russell King (Oracle) <[email protected]>
1 parent 9e8354b commit e02fcd7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

arch/arm/mm/dma-mapping.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1585,9 +1585,11 @@ arm_iommu_create_mapping(struct device *dev, dma_addr_t base, u64 size)
15851585

15861586
spin_lock_init(&mapping->lock);
15871587

1588-
mapping->domain = iommu_domain_alloc(dev->bus);
1589-
if (!mapping->domain)
1588+
mapping->domain = iommu_paging_domain_alloc(dev);
1589+
if (IS_ERR(mapping->domain)) {
1590+
err = PTR_ERR(mapping->domain);
15901591
goto err4;
1592+
}
15911593

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

0 commit comments

Comments
 (0)