From: Ian Campbell Subject: Re: [PATCH for-4.5 7/8] xen/irq: Handle multiple action per IRQ Date: Tue, 18 Mar 2014 15:26:54 +0000 Message-ID: <1395156414.12847.69.camel@kazak.uk.xensource.com> References: <1390581822-32624-1-git-send-email-julien.grall@linaro.org> <1390581822-32624-8-git-send-email-julien.grall@linaro.org> <1392810905.29739.19.camel@kazak.uk.xensource.com> <530673BD.9010301@linaro.org> <530B5275.7010008@citrix.com> <530B6606020000780011ED39@nat28.tlf.novell.com> <530B5BAC.2010100@linaro.org> <531F28D5.1000901@linaro.org> <531F431D0200007800122EC3@nat28.tlf.novell.com> <53276389.8080109@linaro.org> <1395135184.12847.1.camel@kazak.uk.xensource.com> <53283B8D.4030401@linaro.org> <53285E08.1040508@linaro.org> <1395154945.12847.63.camel@kazak.uk.xensource.com> <53286178.1090003@linaro.org> <1395155449.12847.67.camel@kazak.uk.xensource.com> <53286265.5030402@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WPvvD-0003eo-KD for xen-devel@lists.xenproject.org; Tue, 18 Mar 2014 15:27:19 +0000 In-Reply-To: <53286265.5030402@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: Keir Fraser , patches@linaro.org, Stefano Stabellini , tim@xen.org, stefano.stabellini@citrix.com, Jan Beulich , xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org On Tue, 2014-03-18 at 15:12 +0000, Julien Grall wrote: > On 03/18/2014 03:10 PM, Ian Campbell wrote: > > On Tue, 2014-03-18 at 15:08 +0000, Julien Grall wrote: > >> On 03/18/2014 03:02 PM, Ian Campbell wrote: > >>>> int num_irqs = dt_number_of_irq(smmu->node); > >>> > >>> assert(num_irqs == 2) here and the rest gets a lot simpler. The maximum > >>> is a property of the hardware I think, so the driver is allowed to make > >>> such assumptions. > >> > >> I know it would be easier ... but you can't assume that num_irqs == 2 :). > >> > >> The number is not determined. > > > > Are you saying that the SMMU-400 has an arbitrary number of interrupts? > > Yes. And the relevant doc is in the bindings: - #global-interrupts : The number of global interrupts exposed by the device. - interrupts : Interrupt list, with the first #global-irqs entries corresponding to the global interrupts and any following entries corresponding to context interrupts, specified in order of their indexing by the SMMU. For SMMUv2 implementations, there must be exactly one interrupt per context bank. In the case of a single, combined interrupt, it must be listed multiple times.