From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH] xen/arm: gic: GICv2 & GICv3 only supports 1020 physical interrupts Date: Mon, 09 Mar 2015 14:00:27 +0200 Message-ID: <54FD8B5B.2050809@linaro.org> References: <1425400555-14725-1-git-send-email-julien.grall@linaro.org> <1425574810.25940.271.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YUzuu-0003m1-8e for xen-devel@lists.xenproject.org; Mon, 09 Mar 2015 15:48:28 +0000 Received: by widem10 with SMTP id em10so7271345wid.2 for ; Mon, 09 Mar 2015 08:48:26 -0700 (PDT) In-Reply-To: <1425574810.25940.271.camel@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 Cc: xen-devel@lists.xenproject.org, stefano.stabellini@citrix.com, tim@xen.org List-Id: xen-devel@lists.xenproject.org Hi Ian, On 05/03/2015 19:00, Ian Campbell wrote: > On Tue, 2015-03-03 at 16:35 +0000, Julien Grall wrote: >> + gicv3_info.nr_lines = min((unsigned)1020, nr_lines); > > "1020U" is the correct way to write (unsigned)1020 I think (in both > places). I gave a look on several usage of min in arch/arm and (unsigned) was used. Anyway, I guess 1020U is fine. I will use it. > > Otherwise looks ok, although I had to look twice to figure out that the > register initialisation was the same afterwards. > > Where does this value get used? Can you spell it out in the commit log > please. This value is used to check if we can route the IRQ to Xen/a Guest. For instance, using IRQ 1023-1024 in the LRs is unpredictable. So we have to catch it earlier. Even though, the hardware domain should not have the permission to control it. > In particular are you sure that there are no usages which assume this is > a multiple of 32? The only place where we require a multiple of 32 is the vGIC emulation. Although, I have a patch with use DIV_ROUND_UP but I forgot to send with this patch. I will resend both together. Regards, -- Julien Grall