Commit 81ebd91a authored by Lu Baolu's avatar Lu Baolu Committed by Joerg Roedel

iommu/vt-d: Remove redundant IOTLB flush

IOTLB flush already included in the PASID tear down and the page request
drain process. There is no need to flush again.
Signed-off-by: default avatarJacob Pan <jacob.jun.pan@linux.intel.com>
Signed-off-by: default avatarLu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: default avatarKevin Tian <kevin.tian@intel.com>
Link: https://lore.kernel.org/r/20200516062101.29541-17-baolu.lu@linux.intel.comSigned-off-by: default avatarJoerg Roedel <jroedel@suse.de>
parent 66ac4db3
...@@ -209,11 +209,9 @@ static void intel_mm_release(struct mmu_notifier *mn, struct mm_struct *mm) ...@@ -209,11 +209,9 @@ static void intel_mm_release(struct mmu_notifier *mn, struct mm_struct *mm)
* *has* to handle gracefully without affecting other processes. * *has* to handle gracefully without affecting other processes.
*/ */
rcu_read_lock(); rcu_read_lock();
list_for_each_entry_rcu(sdev, &svm->devs, list) { list_for_each_entry_rcu(sdev, &svm->devs, list)
intel_pasid_tear_down_entry(svm->iommu, sdev->dev, intel_pasid_tear_down_entry(svm->iommu, sdev->dev,
svm->pasid, true); svm->pasid, true);
intel_flush_svm_range_dev(svm, sdev, 0, -1, 0);
}
rcu_read_unlock(); rcu_read_unlock();
} }
...@@ -403,7 +401,6 @@ int intel_svm_unbind_gpasid(struct device *dev, int pasid) ...@@ -403,7 +401,6 @@ int intel_svm_unbind_gpasid(struct device *dev, int pasid)
intel_pasid_tear_down_entry(iommu, dev, intel_pasid_tear_down_entry(iommu, dev,
svm->pasid, false); svm->pasid, false);
intel_svm_drain_prq(dev, svm->pasid); intel_svm_drain_prq(dev, svm->pasid);
intel_flush_svm_range_dev(svm, sdev, 0, -1, 0);
kfree_rcu(sdev, rcu); kfree_rcu(sdev, rcu);
if (list_empty(&svm->devs)) { if (list_empty(&svm->devs)) {
...@@ -643,7 +640,6 @@ int intel_svm_unbind_mm(struct device *dev, int pasid) ...@@ -643,7 +640,6 @@ int intel_svm_unbind_mm(struct device *dev, int pasid)
intel_pasid_tear_down_entry(iommu, dev, intel_pasid_tear_down_entry(iommu, dev,
svm->pasid, false); svm->pasid, false);
intel_svm_drain_prq(dev, svm->pasid); intel_svm_drain_prq(dev, svm->pasid);
intel_flush_svm_range_dev(svm, sdev, 0, -1, 0);
kfree_rcu(sdev, rcu); kfree_rcu(sdev, rcu);
if (list_empty(&svm->devs)) { if (list_empty(&svm->devs)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment