From 2f9dad39b0847991dd2b19dc3e999f89397f47f9 Mon Sep 17 00:00:00 2001 From: Burt P Date: Sun, 10 Dec 2017 22:38:17 -0600 Subject: x86,arm: cpu clocks list in package information Show actual clocks where cores or threads share a clock. Ex: x86 SMT each core has one clock shared by both threads. Ex: BCM2837 has one clock for all four cores. Signed-off-by: Burt P --- hardinfo/cpu_util.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'hardinfo') diff --git a/hardinfo/cpu_util.c b/hardinfo/cpu_util.c index e5cf9045..a598d2ed 100644 --- a/hardinfo/cpu_util.c +++ b/hardinfo/cpu_util.c @@ -129,6 +129,11 @@ void cpufreq_update(cpufreq_data *cpufd, int cur_only) cpufd->cpukhz_max = get_cpu_int("cpufreq/scaling_max_freq", cpufd->id, 0); if (cpufd->scaling_driver == NULL) cpufd->scaling_driver = g_strdup("(Unknown)"); if (cpufd->scaling_governor == NULL) cpufd->scaling_governor = g_strdup("(Unknown)"); + + /* x86 uses freqdomain_cpus, all others use affected_cpus */ + cpufd->shared_list = get_cpu_str("cpufreq/freqdomain_cpus", cpufd->id); + if (cpufd->shared_list == NULL) cpufd->shared_list = get_cpu_str("cpufreq/affected_cpus", cpufd->id); + if (cpufd->shared_list == NULL) cpufd->shared_list = g_strdup_printf("%d", cpufd->id); } } -- cgit v1.2.3