On 24/07/2025 12:04 pm, Roger Pau Monne wrote: > diff --git a/xen/arch/arm/include/asm/Makefile > b/xen/arch/arm/include/asm/Makefile > index 4565baca6a4d..cec13c889dab 100644 > --- a/xen/arch/arm/include/asm/Makefile > +++ b/xen/arch/arm/include/asm/Makefile > @@ -5,6 +5,7 @@ generic-y += hardirq.h > generic-y += iocap.h > generic-y += irq-dt.h > generic-y += paging.h > +generic-y += pdx.h > generic-y += percpu.h > generic-y += random.h > generic-y += softirq.h
Please could I talk you into using __has_include__, as I'm slowly trying to purge asm-generic. > diff --git a/xen/include/xen/pdx.h b/xen/include/xen/pdx.h > index 10153da98bf1..91fc32370f21 100644 > --- a/xen/include/xen/pdx.h > +++ b/xen/include/xen/pdx.h > @@ -159,6 +159,14 @@ static inline paddr_t directmapoff_to_maddr(unsigned > long offset) > > #endif /* CONFIG_PDX_MASK_COMPRESSION */ > > +/* > + * Allow each architecture to define it's (possibly optimized) versions of > the > + * translation functions. > + * > + * Do not use _xlate suffixed functions, always use the non _xlate variants. > + */ > +#include <asm/pdx.h> > + You want: #if __has_include__(<asm/pdx.h>) # include <asm/pdx.h> #else // common defaults. #endif here. This lets you implement the x86 special case only, and keeps all the common logic in one file. ~Andrew