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)
commit98f7b0db4976690e47701b702ae314375101e327
tree7af8738fb956ef26b0ad3b4a1d4eb2cbd97fd6c2
parent983ebe57b3af05288aa41ee721f01430424bbf31
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