From e02fcd73779cb7dfd4f31064c6145ca737811f6c Mon Sep 17 00:00:00 2001 From: Jason Gunthorpe Date: Wed, 4 Sep 2024 13:40:10 +0100 Subject: [PATCH] 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 Reviewed-by: Jason Gunthorpe Reviewed-by: Vasant Hegde Acked-by: Michael S. Tsirkin Acked-by: Jeff Johnson Signed-off-by: Jason Gunthorpe Signed-off-by: Russell King (Oracle) --- arch/arm/mm/dma-mapping.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index 52f9c56cc3cb..88c2d68a69c9 100644 --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-mapping.c @@ -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;