> -----Original Message----- > From: Jan Beulich [mailto:[email protected]] > Sent: 05 October 2018 11:14 > To: xen-devel <[email protected]> > Cc: Julien Grall <[email protected]>; Andrew Cooper > <[email protected]>; Paul Durrant <[email protected]>; Wei > Liu <[email protected]>; George Dunlap <[email protected]>; Ian > Jackson <[email protected]>; Stefano Stabellini > <[email protected]>; Konrad Rzeszutek Wilk <[email protected]>; > Tim (Xen.org) <[email protected]> > Subject: [PATCH] p2m: move p2m-common.h inclusion point > > The header is (hence its name) supposed to be a helper for the per-arch > p2m.h files. It was never supposed to be included directly, and for the > purpose of putting common function declarations into the common header > it is more helpful if things like p2m_t are already available at the > inclusion point. > > Take the opportunity and also ditch a duplicate public/memory.h from the > ARM header. > > Signed-off-by: Jan Beulich <[email protected]>
I suppose you could now drop the 'forward enum declaration' part of my patch now that it is no longer forwards (depending on which is committed first of course). Reviewed-by: Paul Durrant <[email protected]> > > --- a/xen/drivers/vpci/header.c > +++ b/xen/drivers/vpci/header.c > @@ -17,12 +17,12 @@ > * License along with this program; If not, see > <http://www.gnu.org/licenses/>. > */ > > -#include <xen/p2m-common.h> > #include <xen/sched.h> > #include <xen/softirq.h> > #include <xen/vpci.h> > > #include <asm/event.h> > +#include <asm/p2m.h> > > #define MAPPABLE_BAR(x) \ > ((x)->type == VPCI_BAR_MEM32 || (x)->type == VPCI_BAR_MEM64_LO || \ > --- a/xen/include/asm-arm/p2m.h > +++ b/xen/include/asm-arm/p2m.h > @@ -7,8 +7,6 @@ > #include <xen/mem_access.h> > #include <public/vm_event.h> /* for vm_event_response_t */ > #include <public/memory.h> > -#include <xen/p2m-common.h> > -#include <public/memory.h> > > #define paddr_bits PADDR_BITS > > @@ -144,6 +142,12 @@ typedef enum { > (P2M_RAM_TYPES | P2M_GRANT_TYPES | \ > p2m_to_mask(p2m_map_foreign))) > > +/* All common type definitions should live ahead of this inclusion. */ > +#ifdef _XEN_P2M_COMMON_H > +# error "xen/p2m-common.h should not be included directly" > +#endif > +#include <xen/p2m-common.h> > + > static inline > void p2m_altp2m_check(struct vcpu *v, uint16_t idx) > { > --- a/xen/include/asm-x86/p2m.h > +++ b/xen/include/asm-x86/p2m.h > @@ -27,7 +27,6 @@ > #define _XEN_ASM_X86_P2M_H > > #include <xen/paging.h> > -#include <xen/p2m-common.h> > #include <xen/mem_access.h> > #include <asm/mem_sharing.h> > #include <asm/page.h> /* for pagetable_t */ > @@ -368,6 +367,12 @@ struct p2m_domain { > /* get host p2m table */ > #define p2m_get_hostp2m(d) ((d)->arch.p2m) > > +/* All common type definitions should live ahead of this inclusion. */ > +#ifdef _XEN_P2M_COMMON_H > +# error "xen/p2m-common.h should not be included directly" > +#endif > +#include <xen/p2m-common.h> > + > /* > * Updates vCPU's n2pm to match its np2m_base in VMCx12 and returns that > np2m. > */ > > > _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
