diff options
author | Jason Gunthorpe <jgg@ziepe.ca> | 2024-09-04 14:40:10 +0200 |
---|---|---|
committer | Russell King (Oracle) <rmk+kernel@armlinux.org.uk> | 2024-09-04 16:02:07 +0200 |
commit | e02fcd73779cb7dfd4f31064c6145ca737811f6c (patch) | |
tree | 32eadbd5316e8bcf99d22700e5d0a51b60c20655 /arch/arm/mm | |
parent | ARM: 9417/1: dma-mapping: Pass device to arm_iommu_create_mapping() (diff) | |
download | linux-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.c | 6 |
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; |