[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y+7DJXWKI+qh1bg4@nvidia.com>
Date: Thu, 16 Feb 2023 19:58:29 -0400
From: Jason Gunthorpe <jgg@...dia.com>
To: Jacob Pan <jacob.jun.pan@...ux.intel.com>
Cc: LKML <linux-kernel@...r.kernel.org>, iommu@...ts.linux.dev,
Lu Baolu <baolu.lu@...ux.intel.com>,
Joerg Roedel <joro@...tes.org>,
Jean-Philippe Brucker <jean-philippe@...aro.com>,
Robin Murphy <robin.murphy@....com>,
Will Deacon <will@...nel.org>,
David Woodhouse <dwmw2@...radead.org>,
Raj Ashok <ashok.raj@...el.com>,
"Tian, Kevin" <kevin.tian@...el.com>, Yi Liu <yi.l.liu@...el.com>,
"Yu, Fenghua" <fenghua.yu@...el.com>,
Dave Hansen <dave.hansen@...el.com>,
Thomas Gleixner <tglx@...utronix.de>,
X86 Kernel <x86@...nel.org>, Dave Jiang <dave.jiang@...el.com>
Subject: Re: [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@...ux.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
Powered by blists - more mailing lists