From owner-p4-projects@FreeBSD.ORG Sun Apr 9 21:06:13 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 D772516A405; Sun, 9 Apr 2006 21:06:12 +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 9904816A400 for ; Sun, 9 Apr 2006 21:06:12 +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 4841F43D48 for ; Sun, 9 Apr 2006 21:06:12 +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 k39L6CPN069620 for ; Sun, 9 Apr 2006 21:06:12 GMT (envelope-from jmg@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k39L6CRh069617 for perforce@freebsd.org; Sun, 9 Apr 2006 21:06:12 GMT (envelope-from jmg@freebsd.org) Date: Sun, 9 Apr 2006 21:06:12 GMT Message-Id: <200604092106.k39L6CRh069617@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 94870 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: Sun, 09 Apr 2006 21:06:13 -0000 http://perforce.freebsd.org/chv.cgi?CH=94870 Change 94870 by jmg@jmg_arlene on 2006/04/09 21:05:55 make compile.. drop hvpci_intr since we just directly register the child's intr w/ the parent... Affected files ... .. //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/hv_pci.c#31 edit .. //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/nexus.c#5 edit Differences ... ==== //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/hv_pci.c#31 (text+ko) ==== @@ -126,16 +126,6 @@ DRIVER_MODULE(hvpci, nexus, hvpci_driver, hvpci_devclass, 0, 0); -static void -hvpci_intr(void *v) -{ - struct hvpci_softc *sc; - - sc = (struct hvpci_softc *)v; - - printf("%s: intr, sc: %p\n", __func__, sc); -} - static int hvpci_probe(device_t dev) { @@ -162,8 +152,8 @@ uint64_t reg, nreg; uint32_t *dvma; int br[2]; - int n, type, error; - int i, nrange, rid; + int n, type; + int i, nrange; sc = device_get_softc(dev); @@ -402,7 +392,8 @@ { struct hvpci_softc *sc; device_t parent; - int pciintr; + int pciintr, rid; + int error; sc = device_get_softc(dev); parent = device_get_parent(dev); ==== //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/nexus.c#5 (text+ko) ==== @@ -316,7 +316,7 @@ printf("dev=%s child=%s\n", ofw_bus_get_name(dev), ofw_bus_get_name(child)); - ino = rman_get_start(ires); + ino = rman_get_start(res); printf("child=%s reg=0x%lx ino=0x%lx\n", ofw_bus_get_name(child), ndi->ndi_devhandle, ino); @@ -522,8 +522,7 @@ struct nexus_devinfo *ndi; struct nexus_regs *reg; bus_addr_t phys; - bus_size_t size; - uint32_t ign, naddrcell, nintrcell; + uint32_t naddrcell, nintrcell; uint32_t *intr; int i, rid; int nintr; @@ -553,9 +552,9 @@ free(reg, M_OFWPROP); if (OF_getprop(node, "#address-cells", &naddrcell, - sizeof *naddrcell) != sizeof *naddrcell || OF_getprop(node, - "#interrupt-cells", &nintrcell, sizeof *nintrcell) != - sizeof *nintrcell || nintrcell != 1) + sizeof naddrcell) != sizeof naddrcell || OF_getprop(node, + "#interrupt-cells", &nintrcell, sizeof nintrcell) != + sizeof nintrcell || nintrcell != 1) panic("can't get cell sizes"); /* or invalid intr cell size */ nintr = OF_getprop_alloc(node, "interrupt-map", sizeof(*intr), @@ -566,13 +565,13 @@ * addr,intr,phandle,parent's intr */ rid = intr[i + naddrcell]; - * XXX - technically, we need to pull the parent's + /* XXX - technically, we need to pull the parent's * #interrupt-cells, but we'll assume it's 1 like we enforce * nintercell to be above. */ resource_list_add(&ndi->ndi_rl, SYS_RES_IRQ, rid, - intr[i + naddrcell + nintercell + 1], - intr[i + naddrcell + nintercell + 1], 1); + intr[i + naddrcell + nintrcell + 1], + intr[i + naddrcell + nintrcell + 1], 1); } free(intr, M_OFWPROP);