[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] xen/x86: Fix compilation issue with clang 3.2
>>> On 01.05.13 at 15:20, Julien Grall <julien.grall@xxxxxxxxxx> wrote: > HYPERVISOR_VIRT_START is an unsigned long constant. In shadow code, Xen > compares this value with a int which is wrong. > > multi.c:1981:5: error: comparison of constant 8796025913344 with expression > of > type 'int' is always true > [-Werror,-Wtautological-constant-out-of-range-compare] > SHADOW_FOREACH_L2E(sl2mfn, sl2e, 0, 0, v->domain, { > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > multi.c:1320:18: note: expanded from macro 'SHADOW_FOREACH_L2E' > < (HYPERVISOR_VIRT_START >> SHADOW_L2_PAGETABLE_SHIFT) ) > \ > ^ > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Which makes relatively obvious that these checks are there only for 32-bit Xen, which we don't have anymore. So rather than fixing dead code, why don't we simply drop it? Jan > Signed-off-by: Julien Grall <julien.grall@xxxxxxxxxx> > --- > xen/arch/x86/mm/shadow/multi.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/xen/arch/x86/mm/shadow/multi.c b/xen/arch/x86/mm/shadow/multi.c > index a8ef75e..f2e70d2 100644 > --- a/xen/arch/x86/mm/shadow/multi.c > +++ b/xen/arch/x86/mm/shadow/multi.c > @@ -1308,7 +1308,8 @@ do { > \ > /* 32-bit l2 on PAE/64: four pages, touch every second entry, and avoid Xen > */ > #define SHADOW_FOREACH_L2E(_sl2mfn, _sl2e, _gl2p, _done, _dom, _code) \ > do { \ > - int _i, _j, __done = 0; \ > + unsigned long _i, _j; \ > + int __done = 0; \ > int _xen = !shadow_mode_external(_dom); \ > ASSERT(mfn_to_page(_sl2mfn)->u.sh.type == SH_type_l2_32_shadow);\ > for ( _j = 0; _j < 4 && !__done; _j++ ) \ > @@ -1335,7 +1336,7 @@ do { > \ > /* PAE: if it's an l2h, don't touch Xen mappings */ > #define SHADOW_FOREACH_L2E(_sl2mfn, _sl2e, _gl2p, _done, _dom, _code) > \ > do { > \ > - int _i; \ > + unsigned long _i; > \ > int _xen = !shadow_mode_external(_dom); > \ > shadow_l2e_t *_sp = sh_map_domain_page((_sl2mfn)); > \ > ASSERT(mfn_to_page(_sl2mfn)->u.sh.type == SH_type_l2_pae_shadow \ > -- > 1.7.10.4 > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@xxxxxxxxxxxxx > http://lists.xen.org/xen-devel _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |