From owner-p4-projects@FreeBSD.ORG Mon Apr 10 05:48:25 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 6D1A616A405; Mon, 10 Apr 2006 05:48:25 +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 4839716A401 for ; Mon, 10 Apr 2006 05:48:25 +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 150E443D4C for ; Mon, 10 Apr 2006 05:48:25 +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 k3A5mOQ2073872 for ; Mon, 10 Apr 2006 05:48:24 GMT (envelope-from jmg@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3A5mOVa073869 for perforce@freebsd.org; Mon, 10 Apr 2006 05:48:24 GMT (envelope-from jmg@freebsd.org) Date: Mon, 10 Apr 2006 05:48:24 GMT Message-Id: <200604100548.k3A5mOVa073869@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 94902 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: Mon, 10 Apr 2006 05:48:25 -0000 http://perforce.freebsd.org/chv.cgi?CH=94902 Change 94902 by jmg@jmg_carbon-60 on 2006/04/10 05:47:57 get the immediate subordinant device.. Affected files ... .. //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/nexus.c#7 edit Differences ... ==== //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/nexus.c#7 (text+ko) ==== @@ -404,7 +404,6 @@ u_long start, u_long end, u_long count, u_int flags) { struct nexus_softc *sc; - struct nexus_devinfo *ndi; struct rman *rm; struct resource *rv; struct resource_list_entry *rle; @@ -414,7 +413,6 @@ needactivate = flags & RF_ACTIVE; passthrough = (device_get_parent(child) != bus); sc = device_get_softc(bus); - ndi = device_get_ivars(child); rle = NULL; if (!passthrough) { @@ -433,6 +431,14 @@ switch (type) { case SYS_RES_IRQ: + /* find the immediate subordinate */ + struct nexus_devinfo *ndi; + device_t subord; + + subord = child; + while (device_get_parent(subord) != bus) + subord = device_get_parent(subord); + ndi = device_get_ivars(subord); rm = &ndi->ndi_intr_rman; break; case SYS_RES_MEMORY: