summaryrefslogtreecommitdiffstats
path: root/sys/amd64/amd64/mp_machdep.c
diff options
context:
space:
mode:
authorattilio <attilio@FreeBSD.org>2011-06-06 21:38:39 +0000
committerattilio <attilio@FreeBSD.org>2011-06-06 21:38:39 +0000
commitfcefe479fe42ec2ebc4b56d9161b88a659dfb40b (patch)
tree7f8a8e666aaf8b4a8bd8609c5ec45698db6451d5 /sys/amd64/amd64/mp_machdep.c
parent8e66ca1ff16b21df31a40fa743f8df3844507305 (diff)
parentc8e197a2037e17686f997232419f8b02d1e61ffc (diff)
downloadFreeBSD-src-fcefe479fe42ec2ebc4b56d9161b88a659dfb40b.zip
FreeBSD-src-fcefe479fe42ec2ebc4b56d9161b88a659dfb40b.tar.gz
MFC
Diffstat (limited to 'sys/amd64/amd64/mp_machdep.c')
-rw-r--r--sys/amd64/amd64/mp_machdep.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c
index 9e20f95..d72afd6 100644
--- a/sys/amd64/amd64/mp_machdep.c
+++ b/sys/amd64/amd64/mp_machdep.c
@@ -242,8 +242,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;
OpenPOWER on IntegriCloud