[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH for-4.6 1/4] xen/arm: vgic: Rename nr_lines into nr_spis



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.



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.