From: Julien Grall Subject: [v3 05/13] xen/arm: gic-v3: Use the domain redistributor information to make the DT node Date: Wed, 1 Jul 2015 12:01:05 +0100 Message-ID: <1435748473-28812-7-git-send-email-julien.grall@citrix.com> References: <1435748473-28812-1-git-send-email-julien.grall@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZAFmF-0000ep-JU for xen-devel@lists.xenproject.org; Wed, 01 Jul 2015 11:02:03 +0000 In-Reply-To: <1435748473-28812-1-git-send-email-julien.grall@citrix.com> 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: Julien Grall , stefano.stabellini@citrix.com, ian.campbell@citrix.com List-Id: xen-devel@lists.xenproject.org It's not necessary to get from the hardware DT the redistributor informations again. We already have it stored in the gic_info and the domain. Use the latter to be consistent with the rest of the function. Signed-off-by: Julien Grall Acked-by: Ian Campbell --- Changes in v3: - Typoes in commit message - Add Ian's ack Changes in v2: - Typo in the commit message --- xen/arch/arm/gic-v3.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/xen/arch/arm/gic-v3.c b/xen/arch/arm/gic-v3.c index d1af147..c8b017f 100644 --- a/xen/arch/arm/gic-v3.c +++ b/xen/arch/arm/gic-v3.c @@ -1105,9 +1105,6 @@ static int gicv3_make_hwdom_dt_node(const struct domain *d, const void *compatible = NULL; uint32_t len; __be32 *new_cells, *tmp; - uint32_t rd_stride = 0; - uint32_t rd_count = 0; - int i, res = 0; compatible = dt_get_property(gic, "compatible", &len); @@ -1121,19 +1118,13 @@ static int gicv3_make_hwdom_dt_node(const struct domain *d, if ( res ) return res; - res = dt_property_read_u32(gic, "redistributor-stride", &rd_stride); - if ( !res ) - rd_stride = 0; - - res = dt_property_read_u32(gic, "#redistributor-regions", &rd_count); - if ( !res ) - rd_count = 1; - - res = fdt_property_cell(fdt, "redistributor-stride", rd_stride); + res = fdt_property_cell(fdt, "redistributor-stride", + d->arch.vgic.rdist_stride); if ( res ) return res; - res = fdt_property_cell(fdt, "#redistributor-regions", rd_count); + res = fdt_property_cell(fdt, "#redistributor-regions", + d->arch.vgic.nr_regions); if ( res ) return res; -- 2.1.4