From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH v2] xen/dt: Allow only IRQ translation that are mapped to main GIC Date: Wed, 09 Jul 2014 13:33:17 +0100 Message-ID: <53BD368D.8090308@linaro.org> References: <1404817331-10195-1-git-send-email-julien.grall@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1X4r3t-00015O-0Y for xen-devel@lists.xenproject.org; Wed, 09 Jul 2014 12:33:25 +0000 Received: by mail-wg0-f48.google.com with SMTP id x12so2468214wgg.19 for ; Wed, 09 Jul 2014 05:33:23 -0700 (PDT) In-Reply-To: <1404817331-10195-1-git-send-email-julien.grall@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: xen-devel@lists.xenproject.org Cc: stefano.stabellini@citrix.com, tim@xen.org, ian.campbell@citrix.com List-Id: xen-devel@lists.xenproject.org On 07/08/2014 12:02 PM, Julien Grall wrote: > Xen is only able to handle one GIC controller. Some platform may contain > other interrupt controller. > > Make sure to only translate IRQ mapped into the GIC handled by Xen. > > Signed-off-by: Julien Grall > > --- > Changes in v2: > - Fix compilation... Please ignore this patch. The problem is bigger than I though. I will send a proper series later. > --- > xen/common/device_tree.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/xen/common/device_tree.c b/xen/common/device_tree.c > index 310635e..7178c77 100644 > --- a/xen/common/device_tree.c > +++ b/xen/common/device_tree.c > @@ -1444,6 +1444,8 @@ int dt_irq_translate(const struct dt_raw_irq *raw, > ASSERT(dt_irq_xlate != NULL); > > /* TODO: Retrieve the right irq_xlate. This is only work for the gic */ > + if ( raw->controller != dt_interrupt_controller ) > + return -EINVAL; > > return dt_irq_xlate(raw->specifier, raw->size, > &out_irq->irq, &out_irq->type); > -- Julien Grall