From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [RFC PATCH v3 13/18] xen/arm: ITS: Add irq descriptors for LPIs Date: Tue, 7 Jul 2015 17:04:29 +0100 Message-ID: <1436285069.25646.264.camel@citrix.com> References: <1434974517-12136-1-git-send-email-vijay.kilari@gmail.com> <1434974517-12136-14-git-send-email-vijay.kilari@gmail.com> <1435582703.32500.317.camel@citrix.com> <55914416.6040704@citrix.com> <559BB4F4.4040909@citrix.com> <1436284206.25646.258.camel@citrix.com> <559BF5D7.6090309@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <559BF5D7.6090309@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: Vijay Kilari , Stefano Stabellini , Prasun Kapoor , Vijaya Kumar K , Tim Deegan , "xen-devel@lists.xen.org" , Stefano Stabellini , manish.jaggi@caviumnetworks.com List-Id: xen-devel@lists.xenproject.org On Tue, 2015-07-07 at 16:52 +0100, Julien Grall wrote: > On 07/07/15 16:50, Ian Campbell wrote: > > I'd rather we refactored these checks into some sort of is_valid_irq() > > helper which could check vs. nr_lines (which remains the > > GICD_TYPER.ITLinesNumber based thing) and the number of LPIs separately. > > > > Combining the two risks considering interrupt in the 1025..8191 range as > > valid and open coding anything more complex than the existing single < > > check in all the relevant places isn't going to scale. > > I would be fine with that too. Although, I think we need to add a > comment on top of gic_number_lines to clearly specify this is not > included LPIs. Strictly speaking an LPI being message signalled is not associated with a line, which is why GICD_TYPER.ITLinesNumber also doesn't consider them. But that's not necessarily all that obvious, so a comment would be appropriate, yes. Ian.