From patchwork Wed Jan 24 14:35:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Przywara X-Patchwork-Id: 125669 Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp456991ljf; Wed, 24 Jan 2018 06:37:40 -0800 (PST) X-Google-Smtp-Source: AH8x226HepYTGnY/6FlOtY76nhjLpi5N0/GKuRGIf9dXbcku0nz7Be5X2y+xJPU1AEsjedMozhC1 X-Received: by 10.36.70.211 with SMTP id j202mr8985246itb.38.1516804660193; Wed, 24 Jan 2018 06:37:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516804660; cv=none; d=google.com; s=arc-20160816; b=efUwAjBy/iZwGnaNneF1Evafs9ejWl/ts8IXZo8AYeuse4xpoKkDf5AUxs6t7cfXh+ kcpTqkCtjZAYEN3HGsJzF9g1SHNJtwdeZUmz7pkUkDKj7ZJuDh1tE8a94SnR/5KTgvXY aPjqltDRTU/KBmprct7AAFy3jlPd2tJ5cXGUPiICwtyGRHphrPEEtOnUO6enpKYcHBGc 3H9xvtiDSCERux/208c8wlcRIzObIVUOuwryylSoL1OzYycjEetA3E0R2Fu4rxpNIKsT qqI7UeAfN5hLv3JZXtd/yivuB1WvKpc2T4SlSJmb6pC2YQDXOhEOAlbywP+zgS9bINk3 n2mg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-unsubscribe:list-id :precedence:subject:cc:references:in-reply-to:message-id:date:to :from:dkim-signature:arc-authentication-results; bh=LJux5cVVKln/dz10PzoygiSWMzqxx32GLdVaenmy+dI=; b=MLfyiwHhETuXYFgg5C38B8vAqRU6aeW7jf7Y9qRTSg/KDOPxJ/BeloyGszZMdqZyPI cptQWUohDkvXjraWgNmLVSKbql1i5xVFBkGKPyYDnIhaZHyRxea0/7NUNVRtc+OxZpJd V+37GAOvxP5C0dm3+gOZfxyA4Eksy7+rngA8jgZ+PMTLc42+1hoh0Mw9SQDmuQ6+Sucq YnD3927eXwpFeuemZQHY3ivbGBu5I1ix/5arO7WuLWb6TFP+GndJLLMalKyC2VYZe3dM 0uWZvj7Dbg0XpmQMGnW5lTxjSSuw7akz3eWNWoWC7aLkf+TZtQs1mkV0XltfRuausTTz u0Tg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=MEDGv1HK; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id a16si293825itb.3.2018.01.24.06.37.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Jan 2018 06:37:40 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=MEDGv1HK; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eeM94-00018I-MJ; Wed, 24 Jan 2018 14:35:22 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eeM93-00016I-El for xen-devel@lists.xenproject.org; Wed, 24 Jan 2018 14:35:21 +0000 X-Inumbo-ID: c9237d7c-0113-11e8-ba59-bc764e045a96 Received: from mail-wr0-x243.google.com (unknown [2a00:1450:400c:c0c::243]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id c9237d7c-0113-11e8-ba59-bc764e045a96; Wed, 24 Jan 2018 15:35:15 +0100 (CET) Received: by mail-wr0-x243.google.com with SMTP id d9so4262979wre.3 for ; Wed, 24 Jan 2018 06:35:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=SGmFCZY5RubzHd6CJHD9VtsO9Zc3NpNH+jLe6+Ndj64=; b=MEDGv1HK1Wv8RiT5eUGEDkn4xCrPEosX5h6BSBmdoMzQ6a0uKKbiF73Lfs8ronJIpN DH61yh3+G+adfyBFy9UEBd1wAAwvpR0wqWKqenyXopJbqDG7cMxNGPKi41ZIlkcNk5ky E521LxqlXy22g8hrkg6kQdm4iaA25fnXOT6W4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=SGmFCZY5RubzHd6CJHD9VtsO9Zc3NpNH+jLe6+Ndj64=; b=TvHlCJsH7eInVn+JYkAuDEP5z+Vl9SrvljY4RGn3mI5ymL22o10J4e/lfbSAkyRmL/ qNR6biHMU9UB4d+UghwQb5OQMVs1Ovdxf+7sTJ/kPn+oVD8SnTerNxxaQu8ZCmY6qAKk DzataqQ/26+3nJguc+qs/E4m5001sLBiZ2zypIMtkzEdCZT6yZyzoBZOkL6a12lx+BV5 7xwB+R75+cEfnEKkj3NsLWh/TuR4wmWxxV2q+B4VhfspI85BgpikzvcXYnHgViil+H7G y/ASXoD0NSVWVZbz8honbJhuLoogBiHSP4i5eSDOOfpAK40zCPXWALAAXbFssKbPOsM7 Ag1w== X-Gm-Message-State: AKwxytcbPoWO160qWCYcdJjaEscwGHerkJgIjhs8Y6ZH5nKDjFlH82Pj Ky0IZfQXtRXvPY5JicVJAdho7A== X-Received: by 10.223.160.87 with SMTP id l23mr5495943wrl.51.1516804515681; Wed, 24 Jan 2018 06:35:15 -0800 (PST) Received: from e104803-lin.lan (mail.andrep.de. [217.160.17.100]) by smtp.gmail.com with ESMTPSA id l9sm3267923wrb.91.2018.01.24.06.35.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 24 Jan 2018 06:35:15 -0800 (PST) From: Andre Przywara To: Stefano Stabellini , Julien Grall Date: Wed, 24 Jan 2018 14:35:13 +0000 Message-Id: <20180124143517.18469-4-andre.przywara@linaro.org> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180124143517.18469-1-andre.przywara@linaro.org> References: <20180124143517.18469-1-andre.przywara@linaro.org> Cc: xen-devel@lists.xenproject.org Subject: [Xen-devel] [PATCH 3/7] ARM: GICv3: emit optional DT property only when necessary X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" The ARM GICv3 DT property "#redistributor-regions" is optional and only useful if it has any other values than the architected "1". Keep our generated DT node clean by emitting this property only if we actually need more than one region. Signed-off-by: Andre Przywara --- xen/arch/arm/gic-v3.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/xen/arch/arm/gic-v3.c b/xen/arch/arm/gic-v3.c index a0d290b55c..9ad0cd19ef 100644 --- a/xen/arch/arm/gic-v3.c +++ b/xen/arch/arm/gic-v3.c @@ -1168,10 +1168,13 @@ static int gicv3_make_hwdom_dt_node(const struct domain *d, if ( res ) return res; - res = fdt_property_cell(fdt, "#redistributor-regions", - d->arch.vgic.nr_regions); - if ( res ) - return res; + if ( d->arch.vgic.nr_regions > 1 ) + { + res = fdt_property_cell(fdt, "#redistributor-regions", + d->arch.vgic.nr_regions); + if ( res ) + return res; + } len = dt_cells_to_size(dt_n_addr_cells(gic) + dt_n_size_cells(gic)); /*