diff options
| author | Paul Osmialowski <pawel.osmialowski@arm.com> | 2017-12-13 16:12:24 +0000 |
|---|---|---|
| committer | Paul Osmialowski <pawel.osmialowski@arm.com> | 2017-12-13 16:12:24 +0000 |
| commit | 7634f7093a752517678a90d0fb1fa5c5d1d69706 (patch) | |
| tree | 083d9761b8d4c42b8b2e094b7bb0d165e91bfaed /openmp/runtime/src | |
| parent | 4ac0b1e6e92f79177e5ca849cc103d6cf2a3f014 (diff) | |
| download | bcm5719-llvm-7634f7093a752517678a90d0fb1fa5c5d1d69706.tar.gz bcm5719-llvm-7634f7093a752517678a90d0fb1fa5c5d1d69706.zip | |
[AArch64] fix an issue with older /proc/cpuinfo layout
There are two /proc/cpuinfo layots in use for AArch64: old and new.
The old one has all 'processor : n' lines in one section, hence
checking for duplications does not make sense.
Differential Revision: https://reviews.llvm.org/D41000
llvm-svn: 320593
Diffstat (limited to 'openmp/runtime/src')
| -rw-r--r-- | openmp/runtime/src/kmp_affinity.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/openmp/runtime/src/kmp_affinity.cpp b/openmp/runtime/src/kmp_affinity.cpp index d7a0eda0d92..9cc504b6520 100644 --- a/openmp/runtime/src/kmp_affinity.cpp +++ b/openmp/runtime/src/kmp_affinity.cpp @@ -2028,7 +2028,15 @@ static int __kmp_affinity_create_cpuinfo_map(AddrUnsPair **address2os, if ((p == NULL) || (KMP_SSCANF(p + 1, "%u\n", &val) != 1)) goto no_val; if (threadInfo[num_avail][osIdIndex] != UINT_MAX) +#if KMP_ARCH_AARCH64 + // Handle the old AArch64 /proc/cpuinfo layout differently, + // it contains all of the 'processor' entries listed in a + // single 'Processor' section, therefore the normal looking + // for duplicates in that section will always fail. + num_avail++; +#else goto dup_field; +#endif threadInfo[num_avail][osIdIndex] = val; #if KMP_OS_LINUX && !(KMP_ARCH_X86 || KMP_ARCH_X86_64) char path[256]; |

