[Openmp-commits] [openmp] r277825 - Fixed x2APIC discovery for 256-processor architectures.
Andrey Churbanov via Openmp-commits
openmp-commits at lists.llvm.org
Fri Aug 5 08:59:11 PDT 2016
Author: achurbanov
Date: Fri Aug 5 10:59:11 2016
New Revision: 277825
URL: http://llvm.org/viewvc/llvm-project?rev=277825&view=rev
Log:
Fixed x2APIC discovery for 256-processor architectures.
Mask for value read from ebx register returned by CPUID expanded to 0xFFFF.
Differential Revision: https://reviews.llvm.org/D23203
Modified:
openmp/trunk/runtime/src/kmp_affinity.cpp
Modified: openmp/trunk/runtime/src/kmp_affinity.cpp
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_affinity.cpp?rev=277825&r1=277824&r2=277825&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_affinity.cpp (original)
+++ openmp/trunk/runtime/src/kmp_affinity.cpp Fri Aug 5 10:59:11 2016
@@ -1429,7 +1429,7 @@ __kmp_affinity_create_x2apicid_map(AddrU
threadLevel = level;
coreLevel = -1;
pkgLevel = -1;
- __kmp_nThreadsPerCore = buf.ebx & 0xff;
+ __kmp_nThreadsPerCore = buf.ebx & 0xffff;
if (__kmp_nThreadsPerCore == 0) {
*msg_id = kmp_i18n_str_InvalidCpuidInfo;
return -1;
@@ -1441,7 +1441,7 @@ __kmp_affinity_create_x2apicid_map(AddrU
//
coreLevel = level;
pkgLevel = -1;
- nCoresPerPkg = buf.ebx & 0xff;
+ nCoresPerPkg = buf.ebx & 0xffff;
if (nCoresPerPkg == 0) {
*msg_id = kmp_i18n_str_InvalidCpuidInfo;
return -1;
@@ -1456,7 +1456,7 @@ __kmp_affinity_create_x2apicid_map(AddrU
continue;
}
pkgLevel = level;
- nPackages = buf.ebx & 0xff;
+ nPackages = buf.ebx & 0xffff;
if (nPackages == 0) {
*msg_id = kmp_i18n_str_InvalidCpuidInfo;
return -1;
More information about the Openmp-commits
mailing list