]> git.baikalelectronics.ru Git - kernel.git/commit
iommu: Use right way to retrieve iommu_ops
authorLu Baolu <baolu.lu@linux.intel.com>
Wed, 16 Feb 2022 02:52:47 +0000 (10:52 +0800)
committerJoerg Roedel <jroedel@suse.de>
Mon, 28 Feb 2022 12:25:49 +0000 (13:25 +0100)
commit8bec16b5b7cfbc550651207547a7a903e94d5282
tree675638a8a5438a2b24c8898fcc7fb3001243c64a
parent93739cd614fe8d0e5147fda316d0d8e271795772
iommu: Use right way to retrieve iommu_ops

The common iommu_ops is hooked to both device and domain. When a helper
has both device and domain pointer, the way to get the iommu_ops looks
messy in iommu core. This sorts out the way to get iommu_ops. The device
related helpers go through device pointer, while the domain related ones
go through domain pointer.

Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/20220216025249.3459465-8-baolu.lu@linux.intel.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/iommu.c
include/linux/iommu.h