diff options
author | Jacob Pan <jacob.jun.pan@linux.intel.com> | 2023-03-22 13:07:59 -0700 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2023-03-31 10:03:25 +0200 |
commit | 2bef9ba8aefc211674427a0db046a773001b3329 (patch) | |
tree | 4337658a83f9f7b34c7fb4ee3ee298e13c9f046f /drivers/iommu/iommu-sva.c | |
parent | cd3891158a77685aee6129f7374a018d13540b2c (diff) |
iommu/sva: Remove PASID to mm lookup function
There is no user of iommu_sva_find() function, remove it so that PASID
allocator can be a simple IDA. Device drivers are expected to store
and keep track of their own PASID metadata.
Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Jason Gunthorpe<jgg@nvidia.com>
Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Link: https://lore.kernel.org/r/20230322200803.869130-4-jacob.jun.pan@linux.intel.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu/iommu-sva.c')
-rw-r--r-- | drivers/iommu/iommu-sva.c | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/drivers/iommu/iommu-sva.c b/drivers/iommu/iommu-sva.c index fcfdc80a3939..4f357ef14f04 100644 --- a/drivers/iommu/iommu-sva.c +++ b/drivers/iommu/iommu-sva.c @@ -51,26 +51,6 @@ out: } EXPORT_SYMBOL_GPL(iommu_sva_alloc_pasid); -/* ioasid_find getter() requires a void * argument */ -static bool __mmget_not_zero(void *mm) -{ - return mmget_not_zero(mm); -} - -/** - * iommu_sva_find() - Find mm associated to the given PASID - * @pasid: Process Address Space ID assigned to the mm - * - * On success a reference to the mm is taken, and must be released with mmput(). - * - * Returns the mm corresponding to this PASID, or an error if not found. - */ -struct mm_struct *iommu_sva_find(ioasid_t pasid) -{ - return ioasid_find(&iommu_sva_pasid, pasid, __mmget_not_zero); -} -EXPORT_SYMBOL_GPL(iommu_sva_find); - /** * iommu_sva_bind_device() - Bind a process address space to a device * @dev: the device |