]> www.infradead.org Git - users/jedix/linux-maple.git/commit
iommu: Refactor __iommu_domain_alloc()
authorJason Gunthorpe <jgg@ziepe.ca>
Mon, 28 Oct 2024 09:37:59 +0000 (09:37 +0000)
committerJoerg Roedel <jroedel@suse.de>
Tue, 29 Oct 2024 09:06:17 +0000 (10:06 +0100)
commit541b967f5a9163b5c36b68599f1141114fbb26fa
treeb29f6a3a4e9445106cb5d12d229e83fafa54a58b
parentf6440fcc9c7b7aaad2e52830ab83fa71990f76ff
iommu: Refactor __iommu_domain_alloc()

Following patch will introduce iommu_paging_domain_alloc_flags() API.
Hence move domain init code to separate function so that it can be
reused.

Also move iommu_get_dma_cookie() setup iommu_setup_default_domain() as
it is required in DMA API mode only.

Signed-off-by: Jason Gunthorpe <jgg@ziepe.ca>
[Split the patch and added description - Vasant]
Signed-off-by: Vasant Hegde <vasant.hegde@amd.com>
Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Yi Liu <yi.l.liu@intel.com>
Link: https://lore.kernel.org/r/20241028093810.5901-2-vasant.hegde@amd.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/iommu.c