diff options
Diffstat (limited to 'sys/powerpc')
-rw-r--r-- | sys/powerpc/include/intr_machdep.h | 2 | ||||
-rw-r--r-- | sys/powerpc/mpc85xx/pci_fdt.c | 6 | ||||
-rw-r--r-- | sys/powerpc/ofw/ofw_pcib_pci.c | 2 | ||||
-rw-r--r-- | sys/powerpc/ofw/ofw_pcibus.c | 6 | ||||
-rw-r--r-- | sys/powerpc/powermac/cpcht.c | 4 | ||||
-rw-r--r-- | sys/powerpc/powermac/grackle.c | 2 | ||||
-rw-r--r-- | sys/powerpc/powermac/macgpio.c | 2 | ||||
-rw-r--r-- | sys/powerpc/powermac/macio.c | 8 | ||||
-rw-r--r-- | sys/powerpc/powermac/uninorth.c | 10 | ||||
-rw-r--r-- | sys/powerpc/powermac/uninorthpci.c | 2 | ||||
-rw-r--r-- | sys/powerpc/powerpc/intr_machdep.c | 2 |
11 files changed, 23 insertions, 23 deletions
diff --git a/sys/powerpc/include/intr_machdep.h b/sys/powerpc/include/intr_machdep.h index d0c6c1b..df73992 100644 --- a/sys/powerpc/include/intr_machdep.h +++ b/sys/powerpc/include/intr_machdep.h @@ -31,7 +31,7 @@ #define INTR_VECTORS 256 #define MAX_PICS 5 -#define INTR_VEC(node, pin) powerpc_get_irq(node, pin) +#define MAP_IRQ(node, pin) powerpc_get_irq(node, pin) /* * Default base address for MSI messages on PowerPC diff --git a/sys/powerpc/mpc85xx/pci_fdt.c b/sys/powerpc/mpc85xx/pci_fdt.c index 7965167..11837c3 100644 --- a/sys/powerpc/mpc85xx/pci_fdt.c +++ b/sys/powerpc/mpc85xx/pci_fdt.c @@ -554,11 +554,11 @@ fsl_pcib_route_int(struct fsl_pcib_softc *sc, u_int bus, u_int slot, u_int func, devfn = DEVFN(bus, slot, func); if (devfn == sc->sc_devfn_via_ide) - intline = INTR_VEC(0, 14); + intline = MAP_IRQ(0, 14); else if (devfn == sc->sc_devfn_via_ide + 1) - intline = INTR_VEC(0, 10); + intline = MAP_IRQ(0, 10); else if (devfn == sc->sc_devfn_via_ide + 2) - intline = INTR_VEC(0, 10); + intline = MAP_IRQ(0, 10); else { if (intpin != 0) err = fdt_pci_route_intr(bus, slot, func, intpin, diff --git a/sys/powerpc/ofw/ofw_pcib_pci.c b/sys/powerpc/ofw/ofw_pcib_pci.c index daf867f..22554df 100644 --- a/sys/powerpc/ofw/ofw_pcib_pci.c +++ b/sys/powerpc/ofw/ofw_pcib_pci.c @@ -171,7 +171,7 @@ ofw_pcib_pci_route_interrupt(device_t bridge, device_t dev, int intpin) * it again on higher levels - that causes problems * in some cases, and never seems to be required. */ - return (INTR_VEC(iparent, mintr)); + return (MAP_IRQ(iparent, mintr)); } } else if (intpin >= 1 && intpin <= 4) { /* diff --git a/sys/powerpc/ofw/ofw_pcibus.c b/sys/powerpc/ofw/ofw_pcibus.c index d4ef78f..9618e4c 100644 --- a/sys/powerpc/ofw/ofw_pcibus.c +++ b/sys/powerpc/ofw/ofw_pcibus.c @@ -213,7 +213,7 @@ ofw_pcibus_enum_devtree(device_t dev, u_int domain, u_int busno) sizeof(icells)); if (iparent != 0) - intr[0] = INTR_VEC(iparent, intr[0]); + intr[0] = MAP_IRQ(iparent, intr[0]); if (iparent != 0 && icells > 1) { powerpc_config_intr(intr[0], @@ -348,12 +348,12 @@ ofw_pcibus_assign_interrupt(device_t dev, device_t child) isz = OF_getprop(node, "AAPL,interrupts", &intr, sizeof(intr)); if (isz == sizeof(intr)) - return ((iparent == -1) ? intr : INTR_VEC(iparent, intr)); + return ((iparent == -1) ? intr : MAP_IRQ(iparent, intr)); isz = OF_getprop(node, "interrupts", &intr, sizeof(intr)); if (isz == sizeof(intr)) { if (iparent != -1) - intr = INTR_VEC(iparent, intr); + intr = MAP_IRQ(iparent, intr); } else { /* No property: our best guess is the intpin. */ intr = pci_get_intpin(child); diff --git a/sys/powerpc/powermac/cpcht.c b/sys/powerpc/powermac/cpcht.c index 9359cd8..0064d77 100644 --- a/sys/powerpc/powermac/cpcht.c +++ b/sys/powerpc/powermac/cpcht.c @@ -655,7 +655,7 @@ cpcht_alloc_msi(device_t dev, device_t child, int count, int maxcount, } for (j = 0; j < count; j++) { - irqs[j] = INTR_VEC(cpcht_msipic, i+j); + irqs[j] = MAP_IRQ(cpcht_msipic, i+j); sc->htirq_map[i+j].irq_type = IRQ_MSI; } mtx_unlock(&sc->htirq_mtx); @@ -695,7 +695,7 @@ cpcht_alloc_msix(device_t dev, device_t child, int *irq) for (i = 8; i < 124; i++) { if (sc->htirq_map[i].irq_type == IRQ_NONE) { sc->htirq_map[i].irq_type = IRQ_MSI; - *irq = INTR_VEC(cpcht_msipic, i); + *irq = MAP_IRQ(cpcht_msipic, i); mtx_unlock(&sc->htirq_mtx); return (0); diff --git a/sys/powerpc/powermac/grackle.c b/sys/powerpc/powermac/grackle.c index ee7fb38..d628914 100644 --- a/sys/powerpc/powermac/grackle.c +++ b/sys/powerpc/powermac/grackle.c @@ -353,7 +353,7 @@ grackle_route_interrupt(device_t bus, device_t dev, int pin) if (ofw_bus_lookup_imap(ofw_bus_get_node(dev), &sc->sc_pci_iinfo, ®, sizeof(reg), &pintr, sizeof(pintr), &mintr, sizeof(mintr), &iparent, maskbuf)) - return (INTR_VEC(iparent, mintr)); + return (MAP_IRQ(iparent, mintr)); /* Maybe it's a real interrupt, not an intpin */ if (pin > 4) diff --git a/sys/powerpc/powermac/macgpio.c b/sys/powerpc/powermac/macgpio.c index a5d5772..709bcff 100644 --- a/sys/powerpc/powermac/macgpio.c +++ b/sys/powerpc/powermac/macgpio.c @@ -191,7 +191,7 @@ macgpio_attach(device_t dev) OF_searchprop(child, "interrupt-parent", &iparent, sizeof(iparent)); resource_list_add(&dinfo->mdi_resources, SYS_RES_IRQ, - 0, INTR_VEC(iparent, irq), INTR_VEC(iparent, irq), + 0, MAP_IRQ(iparent, irq), MAP_IRQ(iparent, irq), 1); } diff --git a/sys/powerpc/powermac/macio.c b/sys/powerpc/powermac/macio.c index 1782a4e..5ca0089 100644 --- a/sys/powerpc/powermac/macio.c +++ b/sys/powerpc/powermac/macio.c @@ -218,12 +218,12 @@ macio_add_intr(phandle_t devnode, struct macio_devinfo *dinfo) panic("Interrupt but no interrupt parent!\n"); for (i = 0; i < nintr; i+=icells) { + u_int irq = MAP_IRQ(iparent, intr[i]); + resource_list_add(&dinfo->mdi_resources, SYS_RES_IRQ, - dinfo->mdi_ninterrupts, INTR_VEC(iparent, intr[i]), - INTR_VEC(iparent, intr[i]), 1); + dinfo->mdi_ninterrupts, irq, irq, 1); - dinfo->mdi_interrupts[dinfo->mdi_ninterrupts] = - INTR_VEC(iparent, intr[i]); + dinfo->mdi_interrupts[dinfo->mdi_ninterrupts] = irq; dinfo->mdi_ninterrupts++; } } diff --git a/sys/powerpc/powermac/uninorth.c b/sys/powerpc/powermac/uninorth.c index 5921a5b..86b4cd5 100644 --- a/sys/powerpc/powermac/uninorth.c +++ b/sys/powerpc/powermac/uninorth.c @@ -175,18 +175,18 @@ unin_chip_add_intr(phandle_t devnode, struct unin_chip_devinfo *dinfo) icells = 1; for (i = 0; i < nintr; i+=icells) { + u_int irq = MAP_IRQ(iparent, intr[i]); + resource_list_add(&dinfo->udi_resources, SYS_RES_IRQ, - dinfo->udi_ninterrupts, INTR_VEC(iparent, intr[i]), - INTR_VEC(iparent, intr[i]), 1); + dinfo->udi_ninterrupts, irq, irq, 1); if (icells > 1) { - powerpc_config_intr(INTR_VEC(iparent, intr[i]), + powerpc_config_intr(irq, (intr[i+1] & 1) ? INTR_TRIGGER_LEVEL : INTR_TRIGGER_EDGE, INTR_POLARITY_LOW); } - dinfo->udi_interrupts[dinfo->udi_ninterrupts] = - INTR_VEC(iparent, intr[i]); + dinfo->udi_interrupts[dinfo->udi_ninterrupts] = irq; dinfo->udi_ninterrupts++; } } diff --git a/sys/powerpc/powermac/uninorthpci.c b/sys/powerpc/powermac/uninorthpci.c index 421c7e5..afca081 100644 --- a/sys/powerpc/powermac/uninorthpci.c +++ b/sys/powerpc/powermac/uninorthpci.c @@ -367,7 +367,7 @@ uninorth_route_interrupt(device_t bus, device_t dev, int pin) if (ofw_bus_lookup_imap(ofw_bus_get_node(dev), &sc->sc_pci_iinfo, ®, sizeof(reg), &pintr, sizeof(pintr), &mintr, sizeof(mintr), &iparent, maskbuf)) - return (INTR_VEC(iparent, mintr)); + return (MAP_IRQ(iparent, mintr)); /* Maybe it's a real interrupt, not an intpin */ if (pin > 4) diff --git a/sys/powerpc/powerpc/intr_machdep.c b/sys/powerpc/powerpc/intr_machdep.c index 6038516..b76ca41 100644 --- a/sys/powerpc/powerpc/intr_machdep.c +++ b/sys/powerpc/powerpc/intr_machdep.c @@ -403,7 +403,7 @@ powerpc_enable_intr(void) KASSERT(piclist[n].ipis != 0, ("%s", __func__)); error = powerpc_setup_intr("IPI", - INTR_VEC(piclist[n].node, piclist[n].irqs), + MAP_IRQ(piclist[n].node, piclist[n].irqs), powerpc_ipi_handler, NULL, NULL, INTR_TYPE_MISC | INTR_EXCL, &ipi_cookie); if (error) { |