[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v2 03/16] xen/arm: mm: Use typesafe mfn for xenheap_mfn_*



On Wed, 21 Jun 2017, Stefano Stabellini wrote:
> On Mon, 19 Jun 2017, Julien Grall wrote:
> > Add more safety when using xenheap_mfn_*.
> > 
> > Signed-off-by: Julien Grall <julien.grall@xxxxxxx>
> 
> Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
> 
> 
> > ---
> > 
> >     I haven't introduced mfn_less_than() and mfn_greather_than() as
> >     there would be only a couple of usage. We would be able to introduce
> >     them and replace the open-coding easily in the future grepping
> >     mfn_x().
> > ---
> >  xen/arch/arm/mm.c        | 16 ++++++++--------
> >  xen/arch/arm/setup.c     | 18 +++++++++---------
> >  xen/include/asm-arm/mm.h | 11 ++++++-----
> >  3 files changed, 23 insertions(+), 22 deletions(-)
> > 
> > diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c
> > index 7b313ca123..452c1e26c3 100644
> > --- a/xen/arch/arm/mm.c
> > +++ b/xen/arch/arm/mm.c
> > @@ -138,8 +138,8 @@ uint64_t init_ttbr;
> >  static paddr_t phys_offset;
> >  
> >  /* Limits of the Xen heap */
> > -unsigned long xenheap_mfn_start __read_mostly = ~0UL;
> > -unsigned long xenheap_mfn_end __read_mostly;
> > +mfn_t xenheap_mfn_start __read_mostly = INVALID_MFN;
> > +mfn_t xenheap_mfn_end __read_mostly;

Actually I get the following build error with
gcc-linaro-4.9-2014.05-aarch64-linux-gnu-x86_64-linux-gnu:

mm.c:141:1: error: initializer element is not constant
 mfn_t xenheap_mfn_start __read_mostly = INVALID_MFN;
 ^
make[4]: *** [mm.o] Error 1

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.