Skip to content

Commit efe4b7c

Browse files
committed
linux/arm: identify aarch64 as arm too
So that we correctly parse /proc/cpuinfo Signed-off-by: Brice Goglin <[email protected]>
1 parent b6a2e31 commit efe4b7c

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

hwloc/topology-linux.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5781,7 +5781,8 @@ hwloc_gather_system_info(struct hwloc_topology *topology,
57815781
|| (data->utsname.machine[0] == 'i' && !strcmp(data->utsname.machine+2, "86"))
57825782
|| !strcmp(data->utsname.machine, "k1om"))
57835783
data->arch = HWLOC_LINUX_ARCH_X86;
5784-
else if (!strncmp(data->utsname.machine, "arm", 3))
5784+
else if (!strcmp(data->utsname.machine, "aarch64")
5785+
|| !strncmp(data->utsname.machine, "arm", 3))
57855786
data->arch = HWLOC_LINUX_ARCH_ARM;
57865787
else if (!strncmp(data->utsname.machine, "ppc", 3)
57875788
|| !strncmp(data->utsname.machine, "power", 5))

tests/hwloc/linux/128arm-2pa2n8cluster4co.console

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Machine (P#0 total=503GiB DMIProductName="XA320 V2 " DMIProductVersion="To be filled by O.E.M." DMIProductSerial=2102312MEA10K9000003 DMIProductUUID=76cfcdd4-c8a7-9486-e911-c1d00a756a75 DMIBoardVendor=Huawei DMIBoardName=BC82HPNBB DMIBoardVersion=V200R002C00 DMIBoardSerial=026MGF10K8000012 DMIBoardAssetTag="To be filled by O.E.M." DMIChassisVendor=Huawei DMIChassisType=17 DMIChassisVersion="To be filled by O.E.M." DMIChassisSerial="To be filled by O.E.M." DMIChassisAssetTag="To be filled by O.E.M." DMIBIOSVendor="Huawei Corp." DMIBIOSVersion=0.86 DMIBIOSDate=07/19/2019 DMISysVendor=Huawei)
2-
Package L#0 (P#36 total=252GiB)
2+
Package L#0 (P#36 total=252GiB CPUImplementer=0x48 CPUArchitecture=8 CPUVariant=0x1 CPUPart=0xd01 CPURevision=0)
33
L3Cache L#0 (total=126GiB size=32MiB linesize=128 ways=128)
44
NUMANode L#0 (P#0 local=126GiB total=126GiB)
55
Group0(Cluster) L#0 (P#138)
@@ -340,7 +340,7 @@ Machine (P#0 total=503GiB DMIProductName="XA320 V2 " DMIProductVersion="To be fi
340340
L1iCache L#63 (size=64KiB linesize=64 ways=4)
341341
Core L#63 (P#63)
342342
PU L#63 (P#63)
343-
Package L#1 (P#8442 total=251GiB)
343+
Package L#1 (P#8442 total=251GiB CPUImplementer=0x48 CPUArchitecture=8 CPUVariant=0x1 CPUPart=0xd01 CPURevision=0)
344344
L3Cache L#2 (total=126GiB size=32MiB linesize=128 ways=128)
345345
NUMANode L#2 (P#2 local=126GiB total=126GiB)
346346
Group0(Cluster) L#16 (P#8544)

0 commit comments

Comments
 (0)