> 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. > + > +PT_FEAT_FLUSH_RANGE > +------------------- > + [...] > + > +PT_FEAT_FLUSH_RANGE_NO_GAPS > +--------------------------- if it's agreed to keep just one feature, then this should be adjusted. > diff --git a/drivers/iommu/generic_pt/pt_iter.h > b/drivers/iommu/generic_pt/pt_iter.h > index 6bd84f96f5ad6e..0956c8a45646c9 100644 > --- a/drivers/iommu/generic_pt/pt_iter.h > +++ b/drivers/iommu/generic_pt/pt_iter.h > @@ -21,7 +21,7 @@ > * pt_check_range() - Validate the range can be iterated > * @range: Range to validate > * > - * Check that va and last_va fall within the permitted range of VAs. If the > + * Check that VA and last_va fall within the permitted range of VAs. If the > * format is using PT_FEAT_SIGN_EXTEND then this also checks the sign > extension > * is correct. > */ not belong to this patch. Reviewed-by: Kevin Tian <[email protected]>
