aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/power/cpupower/utils/idle_monitor/cpupower-monitor.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/power/cpupower/utils/idle_monitor/cpupower-monitor.c b/tools/power/cpupower/utils/idle_monitor/cpupower-monitor.c
index dd8e1ea6e6f2..6cb8d9e6bb6b 100644
--- a/tools/power/cpupower/utils/idle_monitor/cpupower-monitor.c
+++ b/tools/power/cpupower/utils/idle_monitor/cpupower-monitor.c
@@ -149,6 +149,10 @@ void print_results(int topology_depth, int cpu)
149 unsigned long long result; 149 unsigned long long result;
150 cstate_t s; 150 cstate_t s;
151 151
152 /* Be careful CPUs may got resorted for pkg value do not just use cpu */
153 if (!bitmask_isbitset(cpus_chosen, cpu_top.core_info[cpu].cpu))
154 return;
155
152 if (topology_depth > 2) 156 if (topology_depth > 2)
153 printf("%4d|", cpu_top.core_info[cpu].pkg); 157 printf("%4d|", cpu_top.core_info[cpu].pkg);
154 if (topology_depth > 1) 158 if (topology_depth > 1)
@@ -389,6 +393,10 @@ int cmd_monitor(int argc, char **argv)
389 return EXIT_FAILURE; 393 return EXIT_FAILURE;
390 } 394 }
391 395
396 /* Default is: monitor all CPUs */
397 if (bitmask_isallclear(cpus_chosen))
398 bitmask_setall(cpus_chosen);
399
392 dprint("System has up to %d CPU cores\n", cpu_count); 400 dprint("System has up to %d CPU cores\n", cpu_count);
393 401
394 for (num = 0; all_monitors[num]; num++) { 402 for (num = 0; all_monitors[num]; num++) {