summaryrefslogtreecommitdiffstats
path: root/arch/arm/mm
diff options
context:
space:
mode:
authorJason Gunthorpe <jgg@ziepe.ca>2024-09-04 14:40:10 +0200
committerRussell King (Oracle) <rmk+kernel@armlinux.org.uk>2024-09-04 16:02:07 +0200
commite02fcd73779cb7dfd4f31064c6145ca737811f6c (patch)
tree32eadbd5316e8bcf99d22700e5d0a51b60c20655 /arch/arm/mm
parentARM: 9417/1: dma-mapping: Pass device to arm_iommu_create_mapping() (diff)
downloadlinux-e02fcd73779cb7dfd4f31064c6145ca737811f6c.tar.xz
linux-e02fcd73779cb7dfd4f31064c6145ca737811f6c.zip
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>
Diffstat (limited to 'arch/arm/mm')
-rw-r--r--arch/arm/mm/dma-mapping.c6
1 files 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;