Thread (42 messages) 42 messages, 7 authors, 2014-09-30

Re: [PATCH 05/15] powerpc/powernv: Split out set MSI IRQ chip code

From: Michael Neuling <hidden>
Date: 2014-09-22 04:31:53
Also in: lkml

quoted
+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 =3D=3D PNV_PHB_IODA2) {
+		if (!phb->ioda.irq_chip_init) {
+			idata =3D irq_get_irq_data(virq);
+			ichip =3D irq_data_get_irq_chip(idata);
+			phb->ioda.irq_chip_init =3D 1;
+			phb->ioda.irq_chip =3D *ichip;
+			phb->ioda.irq_chip.irq_eoi =3D pnv_ioda2_msi_eoi;
+		}
+
+		irq_set_chip(virq, &phb->ioda.irq_chip);
+	}
+}
+
=20
Nitpick: to check PHB type and bail early could avoid nested code :)
=20
	if (phb->type !=3D PNV_PHB_IODA2)
		return;
OK, will do in repost.

Thanks,
Mikey
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help