Date: Sun, 17 Dec 2006 02:18:15 GMT From: Marcel Moolenaar <marcel@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 111830 for review Message-ID: <200612170218.kBH2IFu3066201@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=111830 Change 111830 by marcel@marcel_nfs on 2006/12/17 02:17:28 The cpu nodes are under the cpus node, not the root node. Affected files ... .. //depot/projects/powerpc/sys/powerpc/powerpc/mp_machdep.c#6 edit Differences ... ==== //depot/projects/powerpc/sys/powerpc/powerpc/mp_machdep.c#6 (text+ko) ==== @@ -51,12 +51,18 @@ * device tree. */ root = OF_peer(0); - for (dev = OF_child(root); dev != 0; dev = OF_peer(dev)) { - res = OF_getprop(dev, "device_type", buf, sizeof(buf)); - if (res < 0) + dev = OF_child(root); + while (dev != 0) { + res = OF_getprop(dev, "name", buf, sizeof(buf)); + if (res < 0 || strcmp(buf, "cpus") != 0) { + dev = OF_peer(dev); continue; - if (strcmp(buf, "cpu") == 0) - mp_ncpus++; + } + for (dev = OF_child(dev); dev != 0; dev = OF_peer(dev)) { + res = OF_getprop(dev, "device_type", buf, sizeof(buf)); + if (res > 0 && strcmp(buf, "cpu") == 0) + mp_ncpus++; + } } /* Sanity. */ if (mp_ncpus == 0)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200612170218.kBH2IFu3066201>