Date: Sat, 10 Apr 2010 10:44:41 +0000 (UTC) From: Marius Strobl <marius@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r206448 - head/sys/sparc64/sparc64 Message-ID: <201004101044.o3AAif4K054586@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: marius Date: Sat Apr 10 10:44:41 2010 New Revision: 206448 URL: http://svn.freebsd.org/changeset/base/206448 Log: 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: head/sys/sparc64/sparc64/ofw_machdep.c Modified: head/sys/sparc64/sparc64/ofw_machdep.c ============================================================================== --- head/sys/sparc64/sparc64/ofw_machdep.c Sat Apr 10 07:26:51 2010 (r206447) +++ head/sys/sparc64/sparc64/ofw_machdep.c Sat Apr 10 10:44:41 2010 (r206448) @@ -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; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201004101044.o3AAif4K054586>