From patchwork Fri Oct 24 09:58:33 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Campbell X-Patchwork-Id: 39416 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f200.google.com (mail-lb0-f200.google.com [209.85.217.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7A45020341 for ; Fri, 24 Oct 2014 10:00:23 +0000 (UTC) Received: by mail-lb0-f200.google.com with SMTP id b6sf1636979lbj.11 for ; Fri, 24 Oct 2014 03:00:22 -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:in-reply-to :references:mime-version:cc:subject:precedence:list-id :list-unsubscribe:list-post:list-help:list-subscribe:sender :errors-to:x-original-sender:x-original-authentication-results :mailing-list:list-archive:content-type:content-transfer-encoding; bh=RqWBHUiIuJ5dQJRl6XPFy/ReVaerccu/efR+FGR9S2c=; b=RDCAx8PtfeXF1UgFpFDpYwPSRt0iwAYWSCDrSaEhWeme/m6KRuzg1SoVAsYx8gYeXA l6+s3i0sOuswD3MHF7BJeHKOEBrOi2fwxCMKkVwqK3QRcudbdqLoGNxgZmOcLOkseg9K uJ8x4zWYSJbNLSJKueeJwOZ6k3ItP/rjawik+IgGM48ScV10H1G7kR02lsRmxo4exd+x yM0Ck/L7PeRUU8VycbEWUDrRKK4tHaK5xyh6o7UAe4vDbspEvqiAZ8JcuOGCHsicJ6Ey XI8FJgUr6T4hZsBuFfsDYuN++oGk0pQYPlXP1qlOWdWNZqSr502DZSVA75mqdInsoqBh 6IMA== X-Gm-Message-State: ALoCoQkL5rAh28HBZHto2kW6IBRWdr9Mazon59KtVyt+dfAqMgylwdvhK1zqVRHLbToaHLrQJZ5A X-Received: by 10.194.239.197 with SMTP id vu5mr2212082wjc.0.1414144822273; Fri, 24 Oct 2014 03:00:22 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.2.1 with SMTP id 1ls454047laq.59.gmail; Fri, 24 Oct 2014 03:00:22 -0700 (PDT) X-Received: by 10.112.11.133 with SMTP id q5mr3209620lbb.77.1414144822071; Fri, 24 Oct 2014 03:00:22 -0700 (PDT) Received: from mail-lb0-f171.google.com (mail-lb0-f171.google.com. [209.85.217.171]) by mx.google.com with ESMTPS id p7si6201720lbr.56.2014.10.24.03.00.21 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 24 Oct 2014 03:00:21 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.171 as permitted sender) client-ip=209.85.217.171; Received: by mail-lb0-f171.google.com with SMTP id z12so2298165lbi.30 for ; Fri, 24 Oct 2014 03:00:21 -0700 (PDT) X-Received: by 10.112.14.69 with SMTP id n5mr3354005lbc.34.1414144821590; Fri, 24 Oct 2014 03:00:21 -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.112.84.229 with SMTP id c5csp398407lbz; Fri, 24 Oct 2014 03:00:20 -0700 (PDT) X-Received: by 10.224.50.84 with SMTP id y20mr4417110qaf.44.1414144819921; Fri, 24 Oct 2014 03:00:19 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id d9si7055196qam.24.2014.10.24.03.00.19 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 24 Oct 2014 03:00:19 -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 1Xhbdr-0001bC-EC; Fri, 24 Oct 2014 09:58:43 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Xhbdq-0001ay-77 for xen-devel@lists.xen.org; Fri, 24 Oct 2014 09:58:42 +0000 Received: from [85.158.137.68] by server-4.bemta-3.messagelabs.com id 43/C9-03246-1D22A445; Fri, 24 Oct 2014 09:58:41 +0000 X-Env-Sender: Ian.Campbell@citrix.com X-Msg-Ref: server-8.tower-31.messagelabs.com!1414144719!11355231!1 X-Originating-IP: [66.165.176.89] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n X-StarScan-Received: X-StarScan-Version: 6.12.3; banners=-,-,- X-VirusChecked: Checked Received: (qmail 20254 invoked from network); 24 Oct 2014 09:58:40 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-8.tower-31.messagelabs.com with RC4-SHA encrypted SMTP; 24 Oct 2014 09:58:40 -0000 X-IronPort-AV: E=Sophos;i="5.04,779,1406592000"; d="scan'208";a="184569751" Received: from ukmail1.uk.xensource.com (10.80.16.128) by smtprelay.citrix.com (10.13.107.79) with Microsoft SMTP Server id 14.3.181.6; Fri, 24 Oct 2014 05:58:38 -0400 Received: from drall.uk.xensource.com ([10.80.16.71]) by ukmail1.uk.xensource.com with smtp (Exim 4.69) (envelope-from ) id 1Xhbdl-0003vG-OH; Fri, 24 Oct 2014 10:58:38 +0100 Received: by drall.uk.xensource.com (sSMTP sendmail emulation); Fri, 24 Oct 2014 10:58:37 +0100 From: Ian Campbell To: Date: Fri, 24 Oct 2014 10:58:33 +0100 Message-ID: <1414144717-32328-1-git-send-email-ian.campbell@citrix.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1414144694.15687.31.camel@citrix.com> References: <1414144694.15687.31.camel@citrix.com> MIME-Version: 1.0 X-DLP: MIA1 Cc: Ian Campbell , stefano.stabellini@eu.citrix.com, julien.grall@linaro.org, tim@xen.org, Clark Laughlin , Pranavkumar Sawargaonkar Subject: [Xen-devel] [PATCH 1/5] xen: arm: propagate gic's #address-cells property to dom0. 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: , 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: ian.campbell@citrix.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.171 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: The interrupt-map property requires that the interrupt-parent node must have both #address-cells and #interrupt-cells properties (see ePAPR 2.4.3.1). Therefore propagate the property if it is present. We must propagate (rather than invent our own value) since this value is used to size fields within other properties within the tree. ePAPR strictly speaking requires that the interrupt-parent node always has these properties. However reality has diverged from this and implementations will recursively search parents for #*-cells properties. Hence we only copy if it is present. Signed-off-by: Ian Campbell Reviewed-by: Julien Grall --- xen/arch/arm/domain_build.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index 5aca925..de180d8 100644 --- a/xen/arch/arm/domain_build.c +++ b/xen/arch/arm/domain_build.c @@ -788,6 +788,8 @@ static int make_gic_node(const struct domain *d, void *fdt, { const struct dt_device_node *gic = dt_interrupt_controller; int res = 0; + const void *addrcells; + u32 addrcells_len; /* * Xen currently supports only a single GIC. Discard any secondary @@ -817,6 +819,14 @@ static int make_gic_node(const struct domain *d, void *fdt, return res; } + addrcells = dt_get_property(gic, "#address-cells", &addrcells_len); + if ( addrcells ) + { + res = fdt_property(fdt, "#address-cells", addrcells, addrcells_len); + if ( res ) + return res; + } + res = fdt_end_node(fdt); return res;