[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250612122355.19629-3-gautham.shenoy@amd.com>
Date: Thu, 12 Jun 2025 17:53:55 +0530
From: "Gautham R. Shenoy" <gautham.shenoy@....com>
To: Thomas Renninger <trenn@...e.com>, Shuah Khan <shuah@...nel.org>, "John B
. Wyatt IV" <jwyatt@...hat.com>, John Kacur <jkacur@...hat.com>
CC: <linux-pm@...r.kernel.org>, <linux-kernel@...r.kernel.org>, "Gautham R.
Shenoy" <gautham.shenoy@....com>
Subject: [PATCH 2/2] pm: cpupower: Fix printing of CORE, CPU fields in cpupower-monitor
After the commit 0014f65e3df0 ("pm: cpupower: remove hard-coded
topology depth values"), "cpupower monitor" output ceased to print the
CORE and the CPU fields on a multi-socket platform.
The reason for this is that the patch changed the behaviour to break
out of the switch-case after printing the PKG details, while prior to
the patch, the CORE and the CPU details would also get printed since
the "if" condition check would pass for any level whose topology depth
was lesser than that of a package.
Fix this ensuring all the details below a desired topology depth are
printed in the cpupower monitor output.
Fixes: 0014f65e3df0 ("pm: cpupower: remove hard-coded topology depth values")
Signed-off-by: Gautham R. Shenoy <gautham.shenoy@....com>
---
tools/power/cpupower/utils/idle_monitor/cpupower-monitor.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/tools/power/cpupower/utils/idle_monitor/cpupower-monitor.c b/tools/power/cpupower/utils/idle_monitor/cpupower-monitor.c
index ad493157f826..e8b3841d5c0f 100644
--- a/tools/power/cpupower/utils/idle_monitor/cpupower-monitor.c
+++ b/tools/power/cpupower/utils/idle_monitor/cpupower-monitor.c
@@ -121,10 +121,8 @@ void print_header(int topology_depth)
switch (topology_depth) {
case TOPOLOGY_DEPTH_PKG:
printf(" PKG|");
- break;
case TOPOLOGY_DEPTH_CORE:
printf("CORE|");
- break;
case TOPOLOGY_DEPTH_CPU:
printf(" CPU|");
break;
@@ -167,10 +165,8 @@ void print_results(int topology_depth, int cpu)
switch (topology_depth) {
case TOPOLOGY_DEPTH_PKG:
printf("%4d|", cpu_top.core_info[cpu].pkg);
- break;
case TOPOLOGY_DEPTH_CORE:
printf("%4d|", cpu_top.core_info[cpu].core);
- break;
case TOPOLOGY_DEPTH_CPU:
printf("%4d|", cpu_top.core_info[cpu].cpu);
break;
--
2.34.1
Powered by blists - more mailing lists