From patchwork Tue Jul 8 10:01:06 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 33183 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f200.google.com (mail-qc0-f200.google.com [209.85.216.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D7FB22070A for ; Tue, 8 Jul 2014 10:03:40 +0000 (UTC) Received: by mail-qc0-f200.google.com with SMTP id o8sf19929611qcw.11 for ; Tue, 08 Jul 2014 03:03:40 -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=V++KsshSkTOqgqpsq+G/oRUCvelozu1NjfMalD5LUhU=; b=FQzG8wke27of9EFfJ82r+GlTABLonq+4iGpr4R4PWzmHnmMiQihYP31D869P/tuG2q sVDD4xoLLs2q43LmioN+ZXe8XdOwkiMZ1NJaLGLfwk6DoSnHefPx0IbQcvVg8ztYIAZn 0BkcN9VxAYAf75eWxdWa55X8Rcf2sFZ01cW7YMj0/Yp6qcZktrcsuC2NmROsvZ3qOqSM N2lGtKp9Bftd1mvml87Qt+rinaLKQwe7oIpSbtcPinY7Zy1XlGbTUMArQwa9wWHtBEDc DPzLUQQpFDRjUCEyRk2dYqKa8TUG0Ep4JTk84233dBDyHMlCGIMobxPkzVw0z3o3av6e h97g== X-Gm-Message-State: ALoCoQkrx7kIISTHecaTXXlE5nYPl1WRFuxDP/FIlVCMQCKY2psnijEZaOurVladgBFRSINCdecu X-Received: by 10.236.202.43 with SMTP id c31mr14652637yho.25.1404813820687; Tue, 08 Jul 2014 03:03:40 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.27.171 with SMTP id 40ls2132663qgx.9.gmail; Tue, 08 Jul 2014 03:03:40 -0700 (PDT) X-Received: by 10.52.69.172 with SMTP id f12mr27707542vdu.26.1404813820627; Tue, 08 Jul 2014 03:03:40 -0700 (PDT) Received: from mail-ve0-f169.google.com (mail-ve0-f169.google.com [209.85.128.169]) by mx.google.com with ESMTPS id bf9si19961292vec.9.2014.07.08.03.03.40 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 08 Jul 2014 03:03:40 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.169 as permitted sender) client-ip=209.85.128.169; Received: by mail-ve0-f169.google.com with SMTP id pa12so5503569veb.28 for ; Tue, 08 Jul 2014 03:03:40 -0700 (PDT) X-Received: by 10.52.27.208 with SMTP id v16mr27987199vdg.21.1404813820557; Tue, 08 Jul 2014 03:03:40 -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 tc5csp756615vcb; Tue, 8 Jul 2014 03:03:40 -0700 (PDT) X-Received: by 10.224.28.65 with SMTP id l1mr59166134qac.87.1404813820127; Tue, 08 Jul 2014 03:03:40 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id 51si32020951qgz.7.2014.07.08.03.03.39 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 08 Jul 2014 03:03:40 -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 1X4SD5-0002uZ-9v; Tue, 08 Jul 2014 10:01:15 +0000 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: from [85.158.137.68:12512] by server-14.bemta-3.messagelabs.com id CF/71-19846-961CBB35; Tue, 08 Jul 2014 10:01:13 +0000 X-Env-Sender: julien.grall@linaro.org X-Msg-Ref: server-11.tower-31.messagelabs.com!1404813672!14670065!1 X-Originating-IP: [209.85.212.172] 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 10539 invoked from network); 8 Jul 2014 10:01:12 -0000 Received: from mail-wi0-f172.google.com (HELO mail-wi0-f172.google.com) (209.85.212.172) by server-11.tower-31.messagelabs.com with RC4-SHA encrypted SMTP; 8 Jul 2014 10:01:12 -0000 Received: by mail-wi0-f172.google.com with SMTP id hi2so652282wib.17 for ; Tue, 08 Jul 2014 03:01:12 -0700 (PDT) X-Received: by 10.194.71.52 with SMTP id r20mr2635911wju.113.1404813672320; Tue, 08 Jul 2014 03:01:12 -0700 (PDT) Received: from belegaer.uk.xensource.com ([185.25.64.249]) by mx.google.com with ESMTPSA id fb15sm5140882wid.23.2014.07.08.03.01.11 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Jul 2014 03:01:11 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xenproject.org Date: Tue, 8 Jul 2014 11:01:06 +0100 Message-Id: <1404813666-25816-1-git-send-email-julien.grall@linaro.org> X-Mailer: git-send-email 1.7.10.4 Cc: stefano.stabellini@citrix.com, Julien Grall , tim@xen.org, ian.campbell@citrix.com Subject: [Xen-devel] [PATCH] 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.169 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 --- 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);