[PATCH 01/28] powerpc: mpic irq_data conversion.

Benjamin Herrenschmidt benh at kernel.crashing.org
Wed Mar 9 18:51:44 EST 2011


On Wed, 2011-03-09 at 08:33 +0100, Lennert Buytenhek wrote:
> > > -static void mpic_unmask_ht_irq(unsigned int irq)
> > > +static void mpic_unmask_ht_irq(struct irq_data *d)
> > >  {
> > > -   struct mpic *mpic = mpic_from_irq(irq);
> > > -   unsigned int src = mpic_irq_to_hw(irq);
> > > +   struct mpic *mpic = mpic_from_irq(d->irq);
> > > +   unsigned int src = mpic_irq_to_hw(d->irq);
> > 
> > It's a bit sad to have a pointerm turn it back to a irq number,
> > look it up just to get back the chip data in there :-)
> 
> ACK, how about the below?

Much better. Do you want to fold it in and re-post only the affected
patch (es) ?

> > Either we should create an mpic_from_irqdata() which itself uses
> > irq_data_get_irq_chip_data() or just change mpic_from_irq() if we
> > decide we can always call it with "data" instead of "irq"
> 
> There's one site left that needs to go from virq to mpic, so I've
> done the former.

Ok.

> > should be trivial to add. Thomas, what do you reckon ?
> 
> It really shouldn't be looking at the desc at all.
> 
> This should help, as we only look at IRQ_LEVEL here:
> 
>         http://git.kernel.org/?p=linux/kernel/git/x86/linux-2.6-tip.git;a=commitdiff;h=876dbd4cc1b35c1a4cb96a2be1d43ea0eabce3b4

Ah yes, indeed. The trigger is all we care about. We can do that in
second phase after Thomas stuff goes in.

Cheers,
Ben.




More information about the Linuxppc-dev mailing list