svn commit: r223413 - in stable/8/sys: amd64/amd64 i386/i386
Andriy Gapon
avg at FreeBSD.org
Wed Jun 22 07:18:15 UTC 2011
Author: avg
Date: Wed Jun 22 07:18:14 2011
New Revision: 223413
URL: http://svn.freebsd.org/changeset/base/223413
Log:
MFC r222756: don't use cpuid level 4 in x86 cpu topology detection if
it's not supported
Modified:
stable/8/sys/amd64/amd64/mp_machdep.c
stable/8/sys/i386/i386/mp_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)
Modified: stable/8/sys/amd64/amd64/mp_machdep.c
==============================================================================
--- stable/8/sys/amd64/amd64/mp_machdep.c Wed Jun 22 07:15:57 2011 (r223412)
+++ stable/8/sys/amd64/amd64/mp_machdep.c Wed Jun 22 07:18:14 2011 (r223413)
@@ -234,8 +234,11 @@ topo_probe_0x4(void)
* logical processors that belong to the same core
* as BSP thus deducing number of threads per core.
*/
- cpuid_count(0x04, 0, p);
- max_cores = ((p[0] >> 26) & 0x3f) + 1;
+ if (cpu_high >= 0x4) {
+ cpuid_count(0x04, 0, p);
+ max_cores = ((p[0] >> 26) & 0x3f) + 1;
+ } else
+ max_cores = 1;
core_id_bits = mask_width(max_logical/max_cores);
if (core_id_bits < 0)
return;
Modified: stable/8/sys/i386/i386/mp_machdep.c
==============================================================================
--- stable/8/sys/i386/i386/mp_machdep.c Wed Jun 22 07:15:57 2011 (r223412)
+++ stable/8/sys/i386/i386/mp_machdep.c Wed Jun 22 07:18:14 2011 (r223413)
@@ -288,8 +288,11 @@ topo_probe_0x4(void)
* logical processors that belong to the same core
* as BSP thus deducing number of threads per core.
*/
- cpuid_count(0x04, 0, p);
- max_cores = ((p[0] >> 26) & 0x3f) + 1;
+ if (cpu_high >= 0x4) {
+ cpuid_count(0x04, 0, p);
+ max_cores = ((p[0] >> 26) & 0x3f) + 1;
+ } else
+ max_cores = 1;
core_id_bits = mask_width(max_logical/max_cores);
if (core_id_bits < 0)
return;
More information about the svn-src-all
mailing list