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.gr...@arm.com>
> 
> Reviewed-by: Stefano Stabellini <sstabell...@kernel.org>
> 
> 
> > ---
> > 
> >     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@lists.xen.org
https://lists.xen.org/xen-devel

Reply via email to