[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] p2m: move p2m-common.h inclusion point
> -----Original Message----- > From: Jan Beulich [mailto:JBeulich@xxxxxxxx] > Sent: 05 October 2018 11:14 > To: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx> > Cc: Julien Grall <julien.grall@xxxxxxx>; Andrew Cooper > <Andrew.Cooper3@xxxxxxxxxx>; Paul Durrant <Paul.Durrant@xxxxxxxxxx>; Wei > Liu <wei.liu2@xxxxxxxxxx>; George Dunlap <George.Dunlap@xxxxxxxxxx>; Ian > Jackson <Ian.Jackson@xxxxxxxxxx>; Stefano Stabellini > <sstabellini@xxxxxxxxxx>; Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>; > Tim (Xen.org) <tim@xxxxxxx> > 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 <jbeulich@xxxxxxxx> 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 <paul.durrant@xxxxxxxxxx> > > --- 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 Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |