From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [RFC 08/22] xen/arm: gic-v2: Use SZ_4K rather than PAGE_SIZE Date: Fri, 5 Jun 2015 13:23:45 +0100 Message-ID: <1433507025.7108.252.camel@citrix.com> References: <1431091783-29090-1-git-send-email-julien.grall@citrix.com> <1431091783-29090-9-git-send-email-julien.grall@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Z0qf8-00033a-5d for xen-devel@lists.xenproject.org; Fri, 05 Jun 2015 12:23:50 +0000 In-Reply-To: <1431091783-29090-9-git-send-email-julien.grall@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: Julien Grall Cc: xen-devel@lists.xenproject.org, tim@xen.org, stefano.stabellini@citrix.com List-Id: xen-devel@lists.xenproject.org On Fri, 2015-05-08 at 14:29 +0100, Julien Grall wrote: > Make clear that the GIC interface is 4K and not rely on PAGE_SIZE == 4K. I'm not really sure about this, it seems like splitting hairs a bit too finely. You forgot your S-o-b. > --- > xen/arch/arm/gic-v2.c | 27 +++++++++++++++------------ > 1 file changed, 15 insertions(+), 12 deletions(-) > > diff --git a/xen/arch/arm/gic-v2.c b/xen/arch/arm/gic-v2.c > index 6c2be33..99d1dfd 100644 > --- a/xen/arch/arm/gic-v2.c > +++ b/xen/arch/arm/gic-v2.c > @@ -85,6 +85,9 @@ static DEFINE_PER_CPU(u8, gic_cpu_id); > /* Maximum cpu interface per GIC */ > #define NR_GIC_CPU_IF 8 > > +#define SHIFT_4K 12 > +#define MASK_4K (~(SZ_4K - 1)) Should go in the same header as SZ_4K IMHO, and should exist for the other sizes too (at least the most common ones).