From owner-svn-src-all@FreeBSD.ORG Sun May 2 16:38:57 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 85D5F1065672; Sun, 2 May 2010 16:38:57 +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 755A18FC1C; Sun, 2 May 2010 16:38:57 +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 o42Gcvcn014111; Sun, 2 May 2010 16:38:57 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42GcvaQ014109; Sun, 2 May 2010 16:38:57 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201005021638.o42GcvaQ014109@svn.freebsd.org> From: Marius Strobl Date: Sun, 2 May 2010 16:38:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207516 - stable/7/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:38:57 -0000 Author: marius Date: Sun May 2 16:38:57 2010 New Revision: 207516 URL: http://svn.freebsd.org/changeset/base/207516 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/7/sys/sparc64/sparc64/ofw_machdep.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/sparc64/sparc64/ofw_machdep.c ============================================================================== --- stable/7/sys/sparc64/sparc64/ofw_machdep.c Sun May 2 16:36:15 2010 (r207515) +++ stable/7/sys/sparc64/sparc64/ofw_machdep.c Sun May 2 16:38:57 2010 (r207516) @@ -187,13 +187,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++) { @@ -233,9 +230,9 @@ OF_decode_addr(phandle_t node, int bank, } if (i == nbank) return (ENXIO); + lbus = bus; skip: addrc = paddrc; - lbus = bus; bus = pbus; }