From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH] x86/bigmem: eliminate struct domain address width restriction Date: Tue, 1 Sep 2015 13:14:24 +0100 Message-ID: <1441109664.27618.56.camel@citrix.com> References: <55DD89B1020000780009D0EB@prv-mh.provo.novell.com> <1441105060.27618.37.camel@citrix.com> <55E5AEED020000780009E91B@prv-mh.provo.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZWkSL-0004vR-16 for xen-devel@lists.xenproject.org; Tue, 01 Sep 2015 12:14:29 +0000 In-Reply-To: <55E5AEED020000780009E91B@prv-mh.provo.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: Andrew Cooper , Keir Fraser , xen-devel List-Id: xen-devel@lists.xenproject.org On Tue, 2015-09-01 at 05:58 -0600, Jan Beulich wrote: > > > > > > On 01.09.15 at 12:57, 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.