From f1644d9d0b31e411a43c73afc4fd46bf73718f8c Mon Sep 17 00:00:00 2001 From: Pawel Dziepak Date: Wed, 2 Oct 2013 01:54:15 +0200 Subject: [PATCH] x86[_64]: Set level shift by counting bits in mask --- src/system/kernel/arch/x86/arch_cpu.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/system/kernel/arch/x86/arch_cpu.cpp b/src/system/kernel/arch/x86/arch_cpu.cpp index 7b7992d31d..614d45e0e5 100644 --- a/src/system/kernel/arch/x86/arch_cpu.cpp +++ b/src/system/kernel/arch/x86/arch_cpu.cpp @@ -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];