[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v7 20/28] xen/arm: ITS: Add virtual ITS availability check helper
On 24/09/15 07:44, Vijay Kilari wrote: > On Wed, Sep 23, 2015 at 2:22 PM, Julien Grall <julien.grall@xxxxxxxxxx> wrote: >> Hi Vijay, >> >> On 18/09/15 14:09, vijay.kilari@xxxxxxxxx wrote: >>> From: Vijaya Kumar K <Vijaya.Kumar@xxxxxxxxxxxxxxxxxx> >>> >>> Introduce vgic_is_lpi_supported() helper function >>> to know virtual ITS availability for a domain >>> >>> Signed-off-by: Vijaya Kumar K <Vijaya.Kumar@xxxxxxxxxxxxxxxxxx> >>> --- >>> v7: - its_enabled field is added to vgic structure >>> --- > [...] >>> diff --git a/xen/arch/arm/vgic.c b/xen/arch/arm/vgic.c >>> index a5ab99d9..3555833 100644 >>> --- a/xen/arch/arm/vgic.c >>> +++ b/xen/arch/arm/vgic.c >>> @@ -62,6 +62,11 @@ struct vgic_irq_rank *vgic_rank_irq(struct vcpu *v, >>> unsigned int irq) >>> return vgic_get_rank(v, rank); >>> } >>> >>> +bool_t vgic_is_lpi_supported(struct domain *d) >>> +{ >>> + return d->arch.vgic.its_enabled; >>> +} >> >> Please move this helper as a static inline to allow the compiler >> inlining the code. >> > > This function is used in vgic-v3.c later. Hence this function is exported. I though you knew that a static inline function can live in the header... > >>> + >>> static void vgic_init_pending_irq(struct pending_irq *p, unsigned int virq) >>> { >>> INIT_LIST_HEAD(&p->inflight); >>> diff --git a/xen/include/asm-arm/domain.h b/xen/include/asm-arm/domain.h >>> index 011f85b..0f6f9d8 100644 >>> --- a/xen/include/asm-arm/domain.h >>> +++ b/xen/include/asm-arm/domain.h >>> @@ -93,6 +93,7 @@ struct arch_domain >>> int ctlr; >>> int nr_spis; /* Number of SPIs */ >>> int nr_lpis; /* Number of LPIs */ >>> + bool_t its_enabled; >> >> The field is GICv3 specific and should go within the HAS_GICV3 section >> below. >> >> Although, I don't think having this boolean is necessary. You can know >> whether we support LPIs or not by checking either the nr_lpis > 0 or >> vits != NULL. >> >> The former would be the best if you plan to keep an helper. > > I will drop its_enabled field and helper will be updated as below. > > bool_t vgic_is_lpi_supported(struct domain *d) > { > return (d->arch.vgic.nr_lpis != 0); > } + static inline and move in the header. Regards, -- Julien Grall _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |