From patchwork Tue Jul 8 11:02:11 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 33184 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f200.google.com (mail-ob0-f200.google.com [209.85.214.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id EF71E20969 for ; Tue, 8 Jul 2014 11:04:05 +0000 (UTC) Received: by mail-ob0-f200.google.com with SMTP id wn1sf4521615obc.3 for ; Tue, 08 Jul 2014 04:04:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:cc:subject :precedence:list-id:list-unsubscribe:list-post:list-help :list-subscribe:mime-version:sender:errors-to:x-original-sender :x-original-authentication-results:mailing-list:list-archive :content-type:content-transfer-encoding; bh=vZqQqa5jLq8f0Vf06qEHUY2uiZCIonoTXI/do9nO8ag=; b=OMag9fWmatOjmUkE14wVkDqzucM1vc2cX3wI6nSIgVfrdR4Z0EyXq8suWVodATNs8p mJLUgQaUJ1a/cUsa00GgOad/ivuBu/tdclFaRzgL1t18cFoddmj8ZmNBb7ZM7dY5aj6/ 520Iln6Oyv4UFSjy6zmZGgUm00RI8KJF3G3lMe6MFhwiPF9l2eeXcLPJVmi5phN/Tl4l 5xKASxyFs2I3xIKBVl5VVjP2Sq2bJCflGoWdhalGr8JvSE/FTkdWQSLo3F9t6/5EuiZD RnUjDw9zLGSxKjEmOT66F3pd+GTPxuWM/3H7GulXe4wtDjpUHq7wY4F8T+kTrmhV3M+h eipA== X-Gm-Message-State: ALoCoQlOToGk3GK0uE7N4e0vLs53SYY9xAVI3hwcleZwLFjk76ALJhzZdVZU+DV5fA9zaytHat0S X-Received: by 10.42.208.72 with SMTP id gb8mr17981416icb.24.1404817445528; Tue, 08 Jul 2014 04:04:05 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.85.40 with SMTP id m37ls2262927qgd.18.gmail; Tue, 08 Jul 2014 04:04:05 -0700 (PDT) X-Received: by 10.53.7.204 with SMTP id de12mr879841vdd.41.1404817445395; Tue, 08 Jul 2014 04:04:05 -0700 (PDT) Received: from mail-ve0-f181.google.com (mail-ve0-f181.google.com [209.85.128.181]) by mx.google.com with ESMTPS id x5si20008994vei.12.2014.07.08.04.04.05 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 08 Jul 2014 04:04:05 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.181 as permitted sender) client-ip=209.85.128.181; Received: by mail-ve0-f181.google.com with SMTP id db11so5322621veb.26 for ; Tue, 08 Jul 2014 04:04:05 -0700 (PDT) X-Received: by 10.52.75.202 with SMTP id e10mr1237vdw.54.1404817445299; Tue, 08 Jul 2014 04:04:05 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp760360vcb; Tue, 8 Jul 2014 04:04:05 -0700 (PDT) X-Received: by 10.224.8.9 with SMTP id f9mr56793325qaf.102.1404817444882; Tue, 08 Jul 2014 04:04:04 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id g4si54933617qam.128.2014.07.08.04.04.04 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 08 Jul 2014 04:04:04 -0700 (PDT) Received-SPF: none (google.com: xen-devel-bounces@lists.xen.org does not designate permitted sender hosts) client-ip=50.57.142.19; Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1X4TAC-0004wZ-Vt; Tue, 08 Jul 2014 11:02:20 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1X4TAC-0004wP-HH for xen-devel@lists.xenproject.org; Tue, 08 Jul 2014 11:02:20 +0000 Received: from [193.109.254.147:8302] by server-11.bemta-14.messagelabs.com id F7/02-12767-BBFCBB35; Tue, 08 Jul 2014 11:02:19 +0000 X-Env-Sender: julien.grall@linaro.org X-Msg-Ref: server-10.tower-27.messagelabs.com!1404817339!16151484!1 X-Originating-IP: [74.125.82.171] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 6.11.3; banners=-,-,- X-VirusChecked: Checked Received: (qmail 1463 invoked from network); 8 Jul 2014 11:02:19 -0000 Received: from mail-we0-f171.google.com (HELO mail-we0-f171.google.com) (74.125.82.171) by server-10.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 8 Jul 2014 11:02:19 -0000 Received: by mail-we0-f171.google.com with SMTP id q58so5806249wes.16 for ; Tue, 08 Jul 2014 04:02:19 -0700 (PDT) X-Received: by 10.180.10.168 with SMTP id j8mr2978603wib.73.1404817338879; Tue, 08 Jul 2014 04:02:18 -0700 (PDT) Received: from hyperion.linaro.local ([213.122.173.130]) by mx.google.com with ESMTPSA id ft17sm95664968wjc.14.2014.07.08.04.02.17 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Jul 2014 04:02:18 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xenproject.org Date: Tue, 8 Jul 2014 12:02:11 +0100 Message-Id: <1404817331-10195-1-git-send-email-julien.grall@linaro.org> X-Mailer: git-send-email 1.9.3 Cc: stefano.stabellini@citrix.com, Julien Grall , tim@xen.org, ian.campbell@citrix.com Subject: [Xen-devel] [PATCH v2] xen/dt: Allow only IRQ translation that are mapped to main GIC X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: julien.grall@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.181 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Archive: 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... --- 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);