Date: Thu, 6 Apr 2006 01:38:58 GMT From: John-Mark Gurney <jmg@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 94712 for review Message-ID: <200604060138.k361cwcU090163@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=94712 Change 94712 by jmg@jmg_arlene on 2006/04/06 01:38:29 make first pass of intr code compile.. Affected files ... .. //depot/projects/kmacy_sun4v/src/sys/sun4v/include/hv_pcivar.h#5 edit .. //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/hv_pci.c#23 edit Differences ... ==== //depot/projects/kmacy_sun4v/src/sys/sun4v/include/hv_pcivar.h#5 (text+ko) ==== @@ -37,6 +37,8 @@ struct resource *hs_intr; void *hs_intrcookie; + struct rman hs_pci_intr_rman; + struct rman hs_pci_mem_rman; bus_space_tag_t hs_pci_memt; bus_space_handle_t hs_pci_memh; ==== //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/hv_pci.c#23 (text+ko) ==== @@ -158,7 +158,7 @@ uint64_t reg, nreg; int br[2]; int n, type, error; - int i, nrange; + int i, nrange, rid; sc = device_get_softc(dev); @@ -185,27 +185,27 @@ #endif rid = 0; - if ((sc->hs_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, - RF_SHAREABLE | RF_ACTIVE)) = NULL) { + if ((sc->hs_intr = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, + RF_SHAREABLE | RF_ACTIVE)) == NULL) { device_printf(dev, "couldn't map interrupt\n"); return ENXIO; } - error = bus_setup_intr(dev, hvpci_intr, INTR_MPSAFE, hvpci_intr, sc, + error = bus_setup_intr(dev, sc->hs_intr, INTR_MPSAFE, hvpci_intr, sc, &sc->hs_intrcookie); if (error) { bus_release_resource(dev, SYS_RES_IRQ, - rman_get_rid(sc->hs_irq), sc->hs_irq); + rman_get_rid(sc->hs_intr), sc->hs_intr); device_printf(dev, "bus_setup_intr: %d\n", error); return error; } /* initalize intr resources */ - sc->hs_intr_rman.rm_type = RMAN_ARRAY; - sc->hs_intr_rman.rm_type = "HyperVisor PCI Interrupts"; - if (rman_init(&sc->hs_intr_rman) != 0 || rman_manage_region(rmanp, 0, - /* XXX - no clue where this should start or end */ - 10) != 0) + sc->hs_pci_intr_rman.rm_type = RMAN_ARRAY; + sc->hs_pci_intr_rman.rm_descr = "HyperVisor PCI Interrupts"; + if (rman_init(&sc->hs_pci_intr_rman) != 0 || + /* XXX - no clue where this should start or end */ + rman_manage_region(&sc->hs_pci_intr_rman, 0, 10) != 0) panic("%s: failed to set up intr rman", __func__); /* Pull in the ra addresses out of OFW */ @@ -398,7 +398,7 @@ { device_printf(dev, "attempted setup_intr: child: %p, ires: %p, flags: %#x, intr: %p, arg: %p, cookiep: %p\n", - child, ireq, flags, intr, arg, cookiep); + child, ires, flags, intr, arg, cookiep); return (0); } @@ -430,8 +430,9 @@ case SYS_RES_IRQ: if (end - start != 0) return NULL; - rm = &sc->sc_pci_intr_rman; - bt = bh = NULL; + rm = &sc->hs_pci_intr_rman; + bt = NULL; + bh = 0; break; case SYS_RES_MEMORY:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200604060138.k361cwcU090163>