x86[_64]: Set level shift by counting bits in mask

This commit is contained in:
Pawel Dziepak 2013-10-02 01:54:15 +02:00
parent fafeda52ea
commit f1644d9d0b

View File

@ -634,7 +634,7 @@ detectIntelCPUTopologyLegacy(int maxBasicLeaf)
sHierarchyMask[CPU_TOPOLOGY_CORE] = (maxCoreID - 1) * kMaxSMTID;
sHierarchyShift[CPU_TOPOLOGY_CORE]
= countSetBits(sHierarchyShift[CPU_TOPOLOGY_SMT]);
= countSetBits(sHierarchyMask[CPU_TOPOLOGY_SMT]);
const uint32 kSinglePackageMask = sHierarchyMask[CPU_TOPOLOGY_SMT]
| sHierarchyMask[CPU_TOPOLOGY_CORE];