]> git.baikalelectronics.ru Git - kernel.git/commit
iommu/vt-d: Remove clearing translation data in disable_dmar_iommu()
authorLu Baolu <baolu.lu@linux.intel.com>
Tue, 12 Jul 2022 00:08:53 +0000 (08:08 +0800)
committerJoerg Roedel <jroedel@suse.de>
Fri, 15 Jul 2022 08:21:34 +0000 (10:21 +0200)
commit4df657e68568756ced58906c6f95ec810a4e902e
tree7af8738fb956ef26b0ad3b4a1d4eb2cbd97fd6c2
parent9aefe6a15e5729ae43557eb9827960843a99d910
iommu/vt-d: Remove clearing translation data in disable_dmar_iommu()

The disable_dmar_iommu() is called when IOMMU initialization fails or
the IOMMU is hot-removed from the system. In both cases, there is no
need to clear the IOMMU translation data structures for devices.

On the initialization path, the device probing only happens after the
IOMMU is initialized successfully, hence there're no translation data
structures.

On the hot-remove path, there is no real use case where the IOMMU is
hot-removed, but the devices that it manages are still alive in the
system. The translation data structures were torn down during device
release, hence there's no need to repeat it in IOMMU hot-remove path
either. This removes the unnecessary code and only leaves a check.

Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Link: https://lore.kernel.org/r/20220706025524.2904370-3-baolu.lu@linux.intel.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/intel/iommu.c
drivers/iommu/intel/pasid.h