From owner-svn-src-all@FreeBSD.ORG Sun May 2 16:40:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E67EE1065670; Sun, 2 May 2010 16:40:18 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 9FDC58FC15; Sun, 2 May 2010 16:40:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o42GeImW014506; Sun, 2 May 2010 16:40:18 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42GeIMR014504; Sun, 2 May 2010 16:40:18 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201005021640.o42GeIMR014504@svn.freebsd.org> From: Marius Strobl Date: Sun, 2 May 2010 16:40:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207518 - stable/8/sys/sparc64/sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 May 2010 16:40:19 -0000 Author: marius Date: Sun May 2 16:40:18 2010 New Revision: 207518 URL: http://svn.freebsd.org/changeset/base/207518 Log: MFC: r206448 Do as the comment suggests and determine the bus space based on the last bus we actually mapped at rather than always based on the last bus we encountered while moving upward in the tree. Otherwise we might use the wrong bus space in case the bridge directly underneath the nexus doesn't require mapping, i.e. was skipped as it's the case for ssm(4) nodes. Modified: stable/8/sys/sparc64/sparc64/ofw_machdep.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/sparc64/sparc64/ofw_machdep.c ============================================================================== --- stable/8/sys/sparc64/sparc64/ofw_machdep.c Sun May 2 16:39:15 2010 (r207517) +++ stable/8/sys/sparc64/sparc64/ofw_machdep.c Sun May 2 16:40:18 2010 (r207518) @@ -186,13 +186,10 @@ OF_decode_addr(phandle_t node, int bank, name[sizeof(name) - 1] = '\0'; goto skip; } - if (lbus != bus) { - if (OF_getprop(bus, "#size-cells", &szc, - sizeof(szc)) == -1) - szc = 1; - if (szc < 1 || szc > 2) - return (ENXIO); - } + if (OF_getprop(bus, "#size-cells", &szc, sizeof(szc)) == -1) + szc = 1; + if (szc < 1 || szc > 2) + return (ENXIO); nbank /= sizeof(banks[0]) * (addrc + paddrc + szc); bank = 0; for (i = 0; i < nbank; i++) { @@ -232,9 +229,9 @@ OF_decode_addr(phandle_t node, int bank, } if (i == nbank) return (ENXIO); + lbus = bus; skip: addrc = paddrc; - lbus = bus; bus = pbus; }