]> git.ipfire.org Git - thirdparty/util-linux.git/commit
lscpu: use cluster on aarch64 machine which doesn't have ACPI PPTT
authorMasayoshi Mizuma <m.mizuma@jp.fujitsu.com>
Fri, 20 Nov 2020 05:06:05 +0000 (00:06 -0500)
committerKarel Zak <kzak@redhat.com>
Fri, 20 Nov 2020 08:17:12 +0000 (09:17 +0100)
commit73c0a766ffbe60e013b55cfd716d531b5a6ae22a
tree41284f9c9fa275bb1adf458f15a4cb3d841cf114
parentffe8cabd1f13862a67ac4519832d2b45569d961d
lscpu: use cluster on aarch64 machine which doesn't have ACPI PPTT

lscpu may show the wrong number of sockets if the machine is aarch64 and
doesn't have ACPI PPTT.

That's because lscpu shows the number of sockets by using a sysfs entry
(cpu/cpuX/topology/core_siblings). The sysfs entry is set by MPIDR_EL1
register if the machine doesn't have ACPI PPTT. MPIDR_EL1 doesn't show
the physical socket information directly. It shows the affinity level.

According to linux/arch/arm64/kernel/topology.c:store_cpu_topology(),
the top level of affinity is called as 'Cluster'.

Use Cluster instead of Socket on the machine which doesn't have ACPI PPTT.

This patch is useful for aarch64 machine which is based on ARM
SBBR v1.0 and v1.1, the specs don't require ACPI PPTT. ARM SBBR v1.2
requires ACPI PPTT.

Signed-off-by: Masayoshi Mizuma <m.mizuma@jp.fujitsu.com>
sys-utils/lscpu-arm.c
sys-utils/lscpu.1
sys-utils/lscpu.c
sys-utils/lscpu.h