diff options
author | Tina Zhang <tina.zhang@intel.com> | 2024-02-27 10:14:39 +0800 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2024-03-01 13:51:20 +0100 |
commit | 8ca918cbc2522e72faa5c102d02059e53d5128d0 (patch) | |
tree | 1b27486d78e97c3df102d4195bc8d104f83effd9 /drivers/iommu | |
parent | cb0b95e56269bb6ca996373a02ff0b6edfa09d32 (diff) | |
download | linux-8ca918cbc2522e72faa5c102d02059e53d5128d0.tar.gz linux-8ca918cbc2522e72faa5c102d02059e53d5128d0.tar.bz2 linux-8ca918cbc2522e72faa5c102d02059e53d5128d0.zip |
iommu/vt-d: Merge intel_svm_bind_mm() into its caller
intel_svm_set_dev_pasid() is the only caller of intel_svm_bind_mm().
Merge them and remove intel_svm_bind_mm(). No functional change
intended.
Signed-off-by: Tina Zhang <tina.zhang@intel.com>
Link: https://lore.kernel.org/r/20240219125723.1645703-4-tina.zhang@intel.com
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu')
-rw-r--r-- | drivers/iommu/intel/svm.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/drivers/iommu/intel/svm.c b/drivers/iommu/intel/svm.c index a92a9e2239e2..1dd56d4eb88c 100644 --- a/drivers/iommu/intel/svm.c +++ b/drivers/iommu/intel/svm.c @@ -315,10 +315,11 @@ out: return 0; } -static int intel_svm_bind_mm(struct intel_iommu *iommu, struct device *dev, - struct iommu_domain *domain, ioasid_t pasid) +static int intel_svm_set_dev_pasid(struct iommu_domain *domain, + struct device *dev, ioasid_t pasid) { struct device_domain_info *info = dev_iommu_priv_get(dev); + struct intel_iommu *iommu = info->iommu; struct mm_struct *mm = domain->mm; struct intel_svm_dev *sdev; struct intel_svm *svm; @@ -796,15 +797,6 @@ out: return ret; } -static int intel_svm_set_dev_pasid(struct iommu_domain *domain, - struct device *dev, ioasid_t pasid) -{ - struct device_domain_info *info = dev_iommu_priv_get(dev); - struct intel_iommu *iommu = info->iommu; - - return intel_svm_bind_mm(iommu, dev, domain, pasid); -} - static void intel_svm_domain_free(struct iommu_domain *domain) { kfree(to_dmar_domain(domain)); |