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

Re: [Xen-devel] [PATCH v7 19/28] xen/arm: ITS: Store LPIs allocated per domain



Hi Vijay,

Commit title: Store the number of LPIs allocated per domain

On 18/09/15 14:09, vijay.kilari@xxxxxxxxx wrote:
> From: Vijaya Kumar K <Vijaya.Kumar@xxxxxxxxxxxxxxxxxx>
> 
> Store number of lpis allocated per domain in vgic structure

NIT: It's not neccessary to repeat the commit title in the commit
message. It would just let it empty.

If you want to keep it: s/Store number of lpis/Store the number of LPIs/

> 
> Signed-off-by: Vijaya Kumar K <Vijaya.Kumar@xxxxxxxxxxxxxxxxxx>
> ---
> v7: - Change commit message.
>     - Store only nr_lpis per domain in vgic structure and drop
>       id_bits.
> ---
>  xen/arch/arm/vgic-v3-its.c   |    2 ++
>  xen/arch/arm/vgic.c          |    1 +
>  xen/include/asm-arm/domain.h |    1 +
>  3 files changed, 4 insertions(+)
> 
> diff --git a/xen/arch/arm/vgic-v3-its.c b/xen/arch/arm/vgic-v3-its.c
> index 3679d11..4285af3 100644
> --- a/xen/arch/arm/vgic-v3-its.c
> +++ b/xen/arch/arm/vgic-v3-its.c
> @@ -843,6 +843,8 @@ int vits_domain_init(struct domain *d)
>      ASSERT(is_hardware_domain(d));
>      ASSERT(vits_hw.enabled);
>  
> +    d->arch.vgic.nr_lpis = gic_nr_irq_ids() - FIRST_GIC_LPI;

Please add a comment to explain that we expose the same number of LPIs
than the HW

> +
>      d->arch.vgic.vits = xzalloc(struct vgic_its);
>      if ( !d->arch.vgic.vits )
>          return -ENOMEM;
> diff --git a/xen/arch/arm/vgic.c b/xen/arch/arm/vgic.c
> index baa74c7..a5ab99d9 100644
> --- a/xen/arch/arm/vgic.c
> +++ b/xen/arch/arm/vgic.c
> @@ -75,6 +75,7 @@ int domain_vgic_init(struct domain *d, unsigned int nr_spis)
>      int ret;
>  
>      d->arch.vgic.ctlr = 0;
> +    d->arch.vgic.nr_lpis = 0;

The struct domain is always initialized to 0, so it's not necessary to
set nr_lpis.

>  
>      /* Limit the number of virtual SPIs supported to (1020 - 32) = 988  */
>      if ( nr_spis > (1020 - NR_LOCAL_IRQS) )
> diff --git a/xen/include/asm-arm/domain.h b/xen/include/asm-arm/domain.h
> index 0f2aa66..011f85b 100644
> --- a/xen/include/asm-arm/domain.h
> +++ b/xen/include/asm-arm/domain.h
> @@ -92,6 +92,7 @@ struct arch_domain
>          spinlock_t lock;
>          int ctlr;
>          int nr_spis; /* Number of SPIs */
> +        int nr_lpis; /* Number of LPIs */
>          unsigned long *allocated_irqs; /* bitmap of IRQs allocated */
>          struct vgic_irq_rank *shared_irqs;
>          /*
> 

Regards,

-- 
Julien Grall

_______________________________________________
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®.