From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH for-4.6 1/4] xen/arm: vgic: Rename nr_lines into nr_spis Date: Tue, 13 Jan 2015 15:38:12 +0000 Message-ID: <1421163492.19103.119.camel@citrix.com> References: <1418395392-30460-1-git-send-email-julien.grall@linaro.org> <1418395392-30460-2-git-send-email-julien.grall@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YB3Y9-0003Ev-TC for xen-devel@lists.xenproject.org; Tue, 13 Jan 2015 15:38:33 +0000 In-Reply-To: <1418395392-30460-2-git-send-email-julien.grall@linaro.org> 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: christoffer.dall@linaro.org, xen-devel@lists.xenproject.org, tim@xen.org, parth.dixit@linaro.org, stefano.stabellini@citrix.com List-Id: xen-devel@lists.xenproject.org On Fri, 2014-12-12 at 14:43 +0000, Julien Grall wrote: > The field nr_lines in the arch_domain vgic structure contains the number of > SPIs for the emulated GIC. Using the nr_lines make confusion with the GIC > code, where it means the number of IRQs. This can lead to coding error. > > Also introduce vgic_nr_lines to get the number of IRQ handled by the emulated > GIC. >>From the code you seem to have called it vgic_nr_irqs, which I prefer. > diff --git a/xen/arch/arm/gic-v2.c b/xen/arch/arm/gic-v2.c > index faad1ff..31fb81a 100644 > --- a/xen/arch/arm/gic-v2.c > +++ b/xen/arch/arm/gic-v2.c > @@ -432,8 +432,6 @@ static int gicv2v_setup(struct domain *d) > d->arch.vgic.cbase = GUEST_GICC_BASE; > } > > - d->arch.vgic.nr_lines = 0; Not replaced with an assignment to nr_spis, as you do in the v3 case? We should be consistent, which also makes me wonder if nr_lines^Wspis should be the responsibility of the common vgic code to setup. > - > /* > * Map the gic virtual cpu interface in the gic cpu interface > * region of the guest. > diff --git a/xen/arch/arm/gic-v3.c b/xen/arch/arm/gic-v3.c > index 076aa62..ec48fc1 100644 > --- a/xen/arch/arm/gic-v3.c > +++ b/xen/arch/arm/gic-v3.c > @@ -922,7 +922,7 @@ static int gicv_v3_init(struct domain *d) > d->arch.vgic.rbase_size[0] = GUEST_GICV3_GICR0_SIZE; > } > > - d->arch.vgic.nr_lines = 0; > + d->arch.vgic.nr_spis = 0; > > return 0; > } Ian.