lkml.org 
[lkml]   [2014]   [Sep]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 05/15] powerpc/powernv: Split out set MSI IRQ chip code
From
Date
> >+static void set_msi_irq_chip(struct pnv_phb *phb, unsigned int virq)
> >+{
> >+ struct irq_data *idata;
> >+ struct irq_chip *ichip;
> >+
> >+ /*
> >+ * Change the IRQ chip for the MSI interrupts on PHB3.
> >+ * The corresponding IRQ chip should be populated for
> >+ * the first time.
> >+ */
> >+ if (phb->type == PNV_PHB_IODA2) {
> >+ if (!phb->ioda.irq_chip_init) {
> >+ idata = irq_get_irq_data(virq);
> >+ ichip = irq_data_get_irq_chip(idata);
> >+ phb->ioda.irq_chip_init = 1;
> >+ phb->ioda.irq_chip = *ichip;
> >+ phb->ioda.irq_chip.irq_eoi = pnv_ioda2_msi_eoi;
> >+ }
> >+
> >+ irq_set_chip(virq, &phb->ioda.irq_chip);
> >+ }
> >+}
> >+
>
> Nitpick: to check PHB type and bail early could avoid nested code :)
>
> if (phb->type != PNV_PHB_IODA2)
> return;

OK, will do in repost.

Thanks,
Mikey



\
 
 \ /
  Last update: 2014-09-22 07:01    [W:0.067 / U:0.852 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site