aboutsummaryrefslogtreecommitdiffstats
path: root/sys-utils/lscpu-arm.c
diff options
context:
space:
mode:
authorMasayoshi Mizuma <m.mizuma@jp.fujitsu.com>2020-11-20 00:06:09 -0500
committerKarel Zak <kzak@redhat.com>2020-11-20 09:17:12 +0100
commitf42f105b07b25097f6c2eae3d6a3ccbc452cda5e (patch)
tree13e66e5aa2ddaa2669fd84dfe466353e24d7d263 /sys-utils/lscpu-arm.c
parent788f90d69a43198e648442399967542e98e44d11 (diff)
downloadutil-linux-f42f105b07b25097f6c2eae3d6a3ccbc452cda5e.tar.gz
lscpu: show the number of physical socket on aarch64 machine without ACPI PPTT
Show the number of the number of physical socket even if the sysfs doesn't have the physical socket information. Note, lscpu shows the number of physical socket as 'Socket(s):' only if root user runs it because accessing the DMI table requires root privilege. Signed-off-by: Masayoshi Mizuma <m.mizuma@jp.fujitsu.com>
Diffstat (limited to 'sys-utils/lscpu-arm.c')
-rw-r--r--sys-utils/lscpu-arm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys-utils/lscpu-arm.c b/sys-utils/lscpu-arm.c
index 9391cca549..9e259673c8 100644
--- a/sys-utils/lscpu-arm.c
+++ b/sys-utils/lscpu-arm.c
@@ -360,6 +360,8 @@ static void arm_decode(struct lscpu_cxt *cxt, struct lscpu_cputype *ct)
arm_ids_decode(ct);
arm_rXpY_decode(ct);
+ if (cxt->is_cluster)
+ ct->nr_socket_on_cluster = get_number_of_physical_sockets_from_dmi();
}
static int lscpu_is_cluster_arm(struct lscpu_cxt *cxt)