|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] x86/bigmem: eliminate struct domain address width restriction
On Tue, 2015-09-01 at 05:58 -0600, Jan Beulich wrote:
> >
> > > > On 01.09.15 at 12:57, <ian.campbell@xxxxxxxxxx> wrote:
> > On Wed, 2015-08-26 at 01:41 -0600, Jan Beulich wrote:
> > > @@ -225,10 +226,12 @@ static unsigned int __init noinline _dom
> > >
> > > return bits;
> > > }
> > > +#endif
> > >
> > > struct domain *alloc_domain_struct(void)
> > > {
> > > struct domain *d;
> > > +#ifndef CONFIG_BIGMEM
> > > /*
> > > * We pack the PDX of the domain structure into a 32-bit field
> > > within
> > > * the page_info structure. Hence the MEMF_bits() restriction.
> > > @@ -237,12 +240,16 @@ struct domain *alloc_domain_struct(void)
> > >
> > > if ( unlikely(!bits) )
> > > bits = _domain_struct_bits();
> > > +#else
> > > +# define bits 0
> >
> > const unsigned int bits = 0;
> >
> > Seems nicer than the trailing #undef?
>
> Hmm, yes, in cases like this I agree (assuming that all compiler
> versions we care about will be intelligent enough to eliminate the
> variable).
Even if it weren't I don't think it would be noticeable in
alloc_domain_struct().
Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |