lkml.org 
[lkml]   [2023]   [Feb]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 2/5] iommu/sva: Move PASID helpers to sva code
On Thu, Feb 16, 2023 at 03:59:48PM -0800, Jacob Pan wrote:
> Preparing to remove IOASID infrastructure, PASID management will be
> under SVA code.
>
> Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
> ---
> drivers/iommu/iommu-sva.c | 19 +++++++++++++++++++
> include/linux/sched/mm.h | 22 +++-------------------
> 2 files changed, 22 insertions(+), 19 deletions(-)
>
> diff --git a/drivers/iommu/iommu-sva.c b/drivers/iommu/iommu-sva.c
> index 24bf9b2b58aa..a3ee258936f0 100644
> --- a/drivers/iommu/iommu-sva.c
> +++ b/drivers/iommu/iommu-sva.c
> @@ -71,6 +71,25 @@ struct mm_struct *iommu_sva_find(ioasid_t pasid)
> }
> EXPORT_SYMBOL_GPL(iommu_sva_find);
>
> +void mm_pasid_init(struct mm_struct *mm)
> +{
> + mm->pasid = INVALID_IOASID;
> +}
> +
> +/* Associate a PASID with an mm_struct: */
> +void mm_pasid_set(struct mm_struct *mm, u32 pasid)
> +{
> + mm->pasid = pasid;
> +}

This is only called from this file, just get rid of it

It would be better if the other two could remain as inlines given
their impact on the fork path..

Jason

\
 
 \ /
  Last update: 2023-03-27 00:26    [W:0.146 / U:0.972 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site