[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 04/21] xen/arm: vgic: Introduce a function to initialize pending_irq
On Wed, 6 Aug 2014, Julien Grall wrote: > Hi Stefano, > > On 08/06/2014 03:06 PM, Stefano Stabellini wrote: > > On Thu, 31 Jul 2014, Julien Grall wrote: > >> The structure pending_irq is initialized on the same way in 2 differents > >> place. Introduce vgic_init_pending_irq to avoid code duplication. > >> > >> Also move the setting of the irq field in this function as we need to > >> initialize it once rather than every time an IRQ is injected to the guest. > >> > >> Signed-off-by: Julien Grall <julien.grall@xxxxxxxxxx> > > > > > > > >> Changes in v2: > >> - Patch added > >> --- > >> xen/arch/arm/vgic.c | 19 ++++++++++--------- > >> 1 file changed, 10 insertions(+), 9 deletions(-) > >> > >> diff --git a/xen/arch/arm/vgic.c b/xen/arch/arm/vgic.c > >> index ac34437..17cde7a 100644 > >> --- a/xen/arch/arm/vgic.c > >> +++ b/xen/arch/arm/vgic.c > >> @@ -53,6 +53,13 @@ struct vgic_irq_rank *vgic_rank_irq(struct vcpu *v, > >> unsigned int irq) > >> return vgic_rank_offset(v, 8, irq, DABT_WORD); > >> } > >> > >> +static void vgic_init_pending_irq(struct pending_irq *p, unsigned virq) > >> +{ > >> + INIT_LIST_HEAD(&p->inflight); > >> + INIT_LIST_HEAD(&p->lr_queue); > >> + p->irq = virq; > >> +} > > > > Reading this code made me realize that the irq field in pending_irq is a > > signed integer, while virq is unsigned. We should be consistent. > > I think we should use unsigned int everywhere. As p->irq is only used in > gic_dump_info, I will made the p->irq change type in this patch. > > > In any case this patch is still an improvement over what we have now: > > > > Acked-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx> > > Can I keep your keep with the p->irq change type? Yes _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |