From: Ian Campbell Subject: Re: [PATCH] xen/arm: Missing +1 when then number of interrupt lines for the GIC is computed Date: Thu, 25 Apr 2013 11:00:01 +0100 Message-ID: <1366884001.20256.447.camel@zakaz.uk.xensource.com> References: <1366832691-27130-1-git-send-email-julien.grall@linaro.org> <1366877449.20256.410.camel@zakaz.uk.xensource.com> <5178FCF0.3070005@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <5178FCF0.3070005@linaro.org> 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.xensource.com" , "patches@linaro.org" , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On Thu, 2013-04-25 at 10:52 +0100, Julien Grall wrote: > On 04/25/2013 09:10 AM, Ian Campbell wrote: > > > On Wed, 2013-04-24 at 20:44 +0100, Julien Grall wrote: > >> In the GIC manual, the number of interrupt lines is computed with the following > >> formula: 32(N + 1) where N is the value retrieved from GICD_TYPER. > > > > My copy of the manual says "The ITLinesNumber field only indicates the > > maximum number of SPIs that the GIC might support", which excludes SGIs > > and PPIs. On the other hand it also says that 0b0011 == 128 interrupts, > > with ID 0..127, and elsewhere it includes SPI and PPI in the term > > interrupts. > > > > So it's not really clear, but I think your interpretation is likely > > correct. > > Perhaps we need to add a comment to describe the "lines" field to avoid > confusion later. Yes, please. > > The impact of getting this count wrong is that currently we don't > > initialise the final 32 interrupts worth of the GICD_FOOn registers, is > > that right? > > > Right. If you are respinning please could you mention this in the changelog, it's the headline feature of the patch really ;-) Ian.