[RFC 4/4] irqchip: gicv2m: Add supports for ARM GICv2m MSI(-X)

Thomas Gleixner
2014-09-29T14:23:08Z

On Sun, 28 Sep 2014, Suravee Suthikulpanit wrote:

> Jason/Thomas,
>
> This patch comes from:
> [V8 2/2] irqchip: gicv2m: Add supports for ARM GICv2m MSI(-X)
> (https://lkml.org/lkml/2014/9/20/113)
>
> It has been slightly modified to remove the multi-MSI supports for now
> (I am waiting to discuss with Marc after he returned from vacation.), and will
> be submitted separately.
>
> Since this patch is independent from the multi-MSI stuff. Please let me know
> if you would consider taking this separately.

Not without an explicit reviewed/acked from Marc for the GIC part and
a reviewed/acked from the DT folks.

Aside of that the conditional madness is just horrible:

> > +static inline
> > +struct gic_chip_data *irq_data_get_gic_chip_data(struct irq_data *d)
> > +{
> > + struct gic_chip_data *gic_data;
> > + struct msi_chip *mchip;
> > + struct v2m_data *v2mdat;
> > +
> > + /*
> > + * For MSI, irq_data.chip_data points to struct msi_chip.
> > + * For non-MSI, irq_data.chip_data points to struct gic_chip_data.
> > + */
> > + if (d->msi_desc) {
> > + mchip = irq_data_get_irq_chip_data(d);
> > + v2mdat = container_of(mchip, struct v2m_data, msi_chip);
> > + gic_data = v2mdat->gic;
> > + } else {
> > + gic_data = irq_data_get_irq_chip_data(d);
> > + }
> > + return gic_data;
> > +}

For heavens sake, why are you insisting on duct-taping that into the
GIC proper instead of coming up with a proper layering?

https://lkml.org/lkml/2014/8/27/228
https://lkml.org/lkml/2014/8/26/707

Thanks,

tglx