tools/power/x86/intel-speed-select: Fix cpu count for TDP level display
authorZhang Rui <rui.zhang@intel.com>
Sat, 20 Aug 2022 15:58:15 +0000 (23:58 +0800)
committerSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Thu, 15 Sep 2022 18:09:22 +0000 (11:09 -0700)
In the function isst_ctdp_display_information(), call to the function
get_cpu_count() is using get_physical_die_id() instead of
get_physical_package_id(). This will result in wrong display of
CPU count in that level.

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
[ Srinivas Pandruvada: fixed subject and change log ]
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
tools/power/x86/intel-speed-select/isst-display.c

index f97d885..726115d 100644 (file)
@@ -377,7 +377,7 @@ void isst_ctdp_display_information(int cpu, FILE *outf, int tdp_level,
                format_and_print(outf, level + 1, header, NULL);
 
                snprintf(header, sizeof(header), "cpu-count");
-               j = get_cpu_count(get_physical_die_id(cpu),
+               j = get_cpu_count(get_physical_package_id(cpu),
                                  get_physical_die_id(cpu));
                snprintf(value, sizeof(value), "%d", j);
                format_and_print(outf, level + 2, header, value);