From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [RFC 04/22] xen/arm: gic-v3: Use the domain redistributor information to make the DT node Date: Fri, 5 Jun 2015 13:15:55 +0100 Message-ID: <1433506555.7108.244.camel@citrix.com> References: <1431091783-29090-1-git-send-email-julien.grall@citrix.com> <1431091783-29090-5-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 1Z0qXZ-0001hK-1j for xen-devel@lists.xenproject.org; Fri, 05 Jun 2015 12:16:01 +0000 In-Reply-To: <1431091783-29090-5-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: Julien Grall Cc: xen-devel@lists.xenproject.org, tim@xen.org, stefano.stabellini@citrix.com List-Id: xen-devel@lists.xenproject.org On Fri, 2015-05-08 at 14:29 +0100, Julien Grall wrote: > It's not neccessary to get again from the hardware DT the redistributor "necessary" I'd say "It is not necessary to get the redistributor information from the hardware again". > informations. We already have it stored in the gic_info and the domain. > > Use the latter to be consistent with the rest of the function. Not just that, but consistent with what we are going to actually emulate, I think, since that may legitimately differ from the h/w. > Signed-off-by: Julien Grall > --- > 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 0b7f29b..16b1df4 100644 > --- a/xen/arch/arm/gic-v3.c > +++ b/xen/arch/arm/gic-v3.c > @@ -1083,9 +1083,6 @@ static int gicv3_make_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); > @@ -1111,19 +1108,13 @@ static int gicv3_make_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; >