From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH for-4.5 v3 2/3] xen: add helpers for PDX mask initialisation calculations Date: Thu, 18 Sep 2014 12:16:32 -0700 Message-ID: <541B2F90.5080008@linaro.org> References: <1410988836.23505.65.camel@citrix.com> <1410988863-15238-2-git-send-email-ian.campbell@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1410988863-15238-2-git-send-email-ian.campbell@citrix.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: Ian Campbell , xen-devel@lists.xen.org Cc: Roy Franz , tim@xen.org, Fu Wei , Jan Beulich , stefano.stabellini@eu.citrix.com List-Id: xen-devel@lists.xenproject.org Hi Ian, On 17/09/14 14:21, Ian Campbell wrote: > +/* Sets all bits from the most-significant 1-bit down to the LSB */ > +static u64 __init fill_mask(u64 mask) > +{ > + while (mask & (mask + 1)) > + mask |= mask + 1; > + return mask; > +} > + > +u64 pdx_init_mask(u64 base_addr) [..] > +u64 pdx_region_mask(u64 base, u64 len) fill_mask is marked as __init. For consistency, those 2 functions should be marked too. Regards, -- Julien Grall