|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v4 4/4] xen/arm: physical irq follow virtual irq
On Wed, 2014-06-11 at 15:47 +0100, Stefano Stabellini wrote:
> > > +void vgic_move_irqs(struct vcpu *v)
> > > +{
> > > + const cpumask_t *cpu_mask = cpumask_of(v->processor);
> > > + struct domain *d = v->domain;
> > > + struct pending_irq *p;
> > > + int i, j, k;
> > > +
> > > + for ( i = 0; i < DOMAIN_NR_RANKS(d); i++ )
> > > + {
> > > + for ( j = 0 ; j < 8 ; j++ )
> > > + {
> > > + for ( k = 0; k < 4; k++ )
> > > + {
> > > + uint8_t target =
> > > byte_read(d->arch.vgic.shared_irqs[i].itargets[j], 0, k);
> >
> > i,j,k are pretty opaque here (and I wrote that before I saw the
> > machinations going on in the irq_to_pending call!).
> >
> > Please just iterate over irqs and use the rank accessor functions to get
> > to the correct itargets to read. Which might be clearest with the
> > irq_to_rank helper I proposed on an earlier patch.
>
> I hacked the alternative solution and I prefer this version.
But, but, this way is horrible! How much worse could the alternative
have been!
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |