On Thu, Sep 18, 2025 at 06:55:31AM +0000, Tian, Kevin wrote:
> > From: Jason Gunthorpe <[email protected]>
> > Sent: Thursday, September 4, 2025 1:46 AM
> > 
> > +For this to work the .c file for each compilation unit will include both 
> > the
> > +format headers and the generic code for the implementation. For instance
> > in an
> > +implementation compilation unit the headers would normally be included
> > as
> > +follows::
> > +
> > +   #include <linux/generic_pt/common.h>
> > +   #include "fmt/defs_amdv1.h"
> > +   #include "pt_defs.h"
> > +   #include "fmt/amdv1.h"
> > +   #include "pt_common.h"
> > +   #include "pt_iter.h"
> > +   #include "IOMMUt_pt.h"  /* The IOMMU implementation */
> 
> "iommu_pt.h"
> 
> btw in reality the C file (e.g. iommu_amdv1.c) is put under fmt/. From that
> angle the path prefix above should be adjusted.

Better?

generic_pt/fmt/iommu_amdv1.c:
        #include <linux/generic_pt/common.h>
        #include "defs_amdv1.h"
        #include "../pt_defs.h"
        #include "amdv1.h"
        #include "../pt_common.h"
        #include "../pt_iter.h"
        #include "../iommu_pt.h"  /* The IOMMU implementation */

Thanks,
Jason

Reply via email to