]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
iommu: Tidy domain for iommu_setup_dma_ops()
authorNicolin Chen <nicolinc@nvidia.com>
Mon, 15 Dec 2025 21:42:17 +0000 (13:42 -0800)
committerJoerg Roedel <joerg.roedel@amd.com>
Sat, 10 Jan 2026 09:26:43 +0000 (10:26 +0100)
commit4a73abb965b7546864957d2bde428f1e72bc3bb5
tree85cf533a8de61858e86a2bdfc10f09dc2c26c800
parent5d5388b0e190b6decb964d3711473b7010bf1f6f
iommu: Tidy domain for iommu_setup_dma_ops()

This function can only be called on the default_domain. Trivally pass it
in. In all three existing cases, the default domain was just attached to
the device.

This avoids iommu_setup_dma_ops() calling iommu_get_domain_for_dev() that
will be used by external callers.

Suggested-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Tested-by: Dheeraj Kumar Srivastava <dheerajkumar.srivastava@amd.com>
Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
drivers/iommu/dma-iommu.c
drivers/iommu/dma-iommu.h
drivers/iommu/iommu.c