From owner-p4-projects@FreeBSD.ORG Thu Apr 6 01:39:00 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C0B4516A427; Thu, 6 Apr 2006 01:39:00 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9BC8216A424 for ; Thu, 6 Apr 2006 01:39:00 +0000 (UTC) (envelope-from jmg@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0E94243D5F for ; Thu, 6 Apr 2006 01:38:59 +0000 (GMT) (envelope-from jmg@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k361cwXo090171 for ; Thu, 6 Apr 2006 01:38:58 GMT (envelope-from jmg@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k361cwcU090163 for perforce@freebsd.org; Thu, 6 Apr 2006 01:38:58 GMT (envelope-from jmg@freebsd.org) Date: Thu, 6 Apr 2006 01:38:58 GMT Message-Id: <200604060138.k361cwcU090163@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jmg@freebsd.org using -f From: John-Mark Gurney To: Perforce Change Reviews Cc: Subject: PERFORCE change 94712 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Apr 2006 01:39:01 -0000 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: