From: Julien Grall Subject: [PATCH] xen/dt: Allow only IRQ translation that are mapped to main GIC Date: Tue, 8 Jul 2014 11:01:06 +0100 Message-ID: <1404813666-25816-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.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1X4SD4-0002uU-4o for xen-devel@lists.xenproject.org; Tue, 08 Jul 2014 10:01:14 +0000 Received: by mail-wi0-f172.google.com with SMTP id hi2so652282wib.17 for ; Tue, 08 Jul 2014 03:01:12 -0700 (PDT) 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, Julien Grall , tim@xen.org, ian.campbell@citrix.com List-Id: xen-devel@lists.xenproject.org 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 --- 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..04bd1e9 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 ( rirq.controller != dt_interrupt_controller ) + return -EINVAL; return dt_irq_xlate(raw->specifier, raw->size, &out_irq->irq, &out_irq->type); -- 1.7.10.4