lkml.org 
[lkml]   [2023]   [Mar]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v5 2/7] iommu/sva: Move PASID helpers to sva code
Hi Robin,

On Fri, 10 Mar 2023 20:00:52 +0000, Robin Murphy <robin.murphy@arm.com>
wrote:

> On 2023-03-09 22:21, Jacob Pan wrote:
> > Preparing to remove IOASID infrastructure, PASID management will be
> > under SVA code. Decouple mm code from IOASID. Use iommu-help.h instead
> > of iommu.h to prevent circular inclusion.
> >
> > Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
> > ---
> > v5:
> > - move definition of helpers to iommu code to be consistent with
> > declarations. (Kevin)
> > - fix patch partitioning bug (Baolu)
> > v4:
> > - delete and open code mm_set_pasid
> > - keep mm_init_pasid() as inline for fork performance
> > ---
> > drivers/iommu/iommu-sva.c | 10 +++++++++-
> > include/linux/ioasid.h | 2 +-
> > include/linux/iommu-helper.h | 12 ++++++++++++
>
> Eww, can we not? iommu-helper is very much just parts of a specific type
> of bitmap-based IOVA allocator used by some crusty old arch-specific
> IOMMU code and SWIOTLB. It is unrelated to the iommu.h IOMMU API, and
> dragging that stuff into modern SVA-related matters seems bizarrely
> inappropriate. Could we just move the mm_pasid stuff into ioasid.h here,
> then maybe rename it to iommu-sva.h at the end if eradicating the old
> name really matters?
thanks for explaining the history behind iommu-helper.h, having a new
include/linux/iommu-sva.h would probably be cleaner.

my original intent for using iommu-helper.h was to avoid problems by mm.h
#include iommu.h. So I just needed a separate small header. let me do
without iommu-helper.h.

Thanks,

Jacob

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