From 09db040339847c39a64bce6c06351c1f4a571cc2 Mon Sep 17 00:00:00 2001 From: Zhang Rui Date: Sat, 20 Aug 2022 23:58:15 +0800 Subject: [PATCH] tools/power/x86/intel-speed-select: Fix cpu count for TDP level display 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 [ Srinivas Pandruvada: fixed subject and change log ] Signed-off-by: Srinivas Pandruvada --- tools/power/x86/intel-speed-select/isst-display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/power/x86/intel-speed-select/isst-display.c b/tools/power/x86/intel-speed-select/isst-display.c index f97d885..726115d 100644 --- a/tools/power/x86/intel-speed-select/isst-display.c +++ b/tools/power/x86/intel-speed-select/isst-display.c @@ -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); -- 2.7.4