lkml.org 
[lkml]   [2023]   [Oct]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v5 3/6] iommu: Introduce mm_get_pasid() helper function
On Mon, Sep 25, 2023 at 10:38:10AM +0800, Tina Zhang wrote:

> diff --git a/include/linux/iommu.h b/include/linux/iommu.h
> index a4eab6697fe1..db2510da28c1 100644
> --- a/include/linux/iommu.h
> +++ b/include/linux/iommu.h
> @@ -1189,10 +1189,14 @@ static inline bool mm_valid_pasid(struct mm_struct *mm)
> {
> return mm->pasid != IOMMU_PASID_INVALID;
> }
> -static inline u32 mm_get_enqcmd_pasid(struct mm_struct *mm)
> +static inline u32 mm_get_pasid(struct mm_struct *mm)

This should not be in a global header

Put the mm_get_pasid() in iommu-sva.c as a helper

Have SMMUv3 call mm_get_enqcmd_pasid() for now, it will be fixed

There is no "mm_pasid" that should leak outside of iommu-sva.c except
specifically to support enqcmd.

Jason

\
 
 \ /
  Last update: 2023-10-05 20:45    [W:0.131 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site