From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH for-4.6 1/4] xen/arm: vgic: Rename nr_lines into nr_spis Date: Tue, 13 Jan 2015 15:52:58 +0000 Message-ID: <54B53F5A.7070306@linaro.org> References: <1418395392-30460-1-git-send-email-julien.grall@linaro.org> <1418395392-30460-2-git-send-email-julien.grall@linaro.org> <1421163492.19103.119.camel@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 1YB3mj-0004yc-UF for xen-devel@lists.xenproject.org; Tue, 13 Jan 2015 15:53:38 +0000 Received: by mail-wi0-f181.google.com with SMTP id hi2so4865659wib.2 for ; Tue, 13 Jan 2015 07:53:27 -0800 (PST) In-Reply-To: <1421163492.19103.119.camel@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: Ian Campbell 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 Hi Ian, On 13/01/15 15:38, Ian Campbell wrote: > 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. It's an error in the commit message. I will fix it in the next version. >> 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. Actually it's already in common vgic code (see domain_vgic_init). The initialization in gicv2v_setup was unnecessary, so does in gic_v3_init. I just forgot to drop it. Shall I create a separate patch for the 2 lines drop? Or add a comment in the commit message? Regards, -- Julien Grall