[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v8 19/28] xen/arm: ITS: Store the number of LPIs allocated per domain
From: Vijaya Kumar K <Vijaya.Kumar@xxxxxxxxxxxxxxxxxx> Store the number of lpis allocated per domain in vgic structure Signed-off-by: Vijaya Kumar K <Vijaya.Kumar@xxxxxxxxxxxxxxxxxx> --- v8: - Updated commit message and added comments - Removed initialization of vgic.nr_lpis to zero v7: - Change commit message. - Store only nr_lpis per domain in vgic structure and drop id_bits. --- xen/arch/arm/vgic-v3-its.c | 6 ++++++ xen/include/asm-arm/domain.h | 1 + 2 files changed, 7 insertions(+) diff --git a/xen/arch/arm/vgic-v3-its.c b/xen/arch/arm/vgic-v3-its.c index 36e6385..913b49d 100644 --- a/xen/arch/arm/vgic-v3-its.c +++ b/xen/arch/arm/vgic-v3-its.c @@ -860,6 +860,12 @@ int vits_domain_init(struct domain *d) ASSERT(is_hardware_domain(d)); ASSERT(vits_hw.enabled); + /* + * HW might support more number of LPIs than specified here for a domain. + * Here we limit number of LPIs supported for domain to nr_lpis. + */ + d->arch.vgic.nr_lpis = gic_nr_irq_ids() - FIRST_GIC_LPI; + d->arch.vgic.vits = xzalloc(struct vgic_its); if ( !d->arch.vgic.vits ) return -ENOMEM; diff --git a/xen/include/asm-arm/domain.h b/xen/include/asm-arm/domain.h index 0ac62d9..0904204 100644 --- a/xen/include/asm-arm/domain.h +++ b/xen/include/asm-arm/domain.h @@ -93,6 +93,7 @@ struct arch_domain spinlock_t lock; uint32_t 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; /* -- 1.7.9.5 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |