summaryrefslogtreecommitdiff
path: root/tools/power
diff options
context:
space:
mode:
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>2020-03-05 14:45:13 -0800
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>2020-03-20 14:46:19 +0200
commitf5205f493100f1cdbecdf5498abb4c3dbdce08c5 (patch)
tree5382e68339adda4a7b8b87e99069156b58c390fa /tools/power
parentf0e0b4d17baaaf4968664f8fe79c66a7417aaab0 (diff)
tools/power/x86/intel-speed-select: Make target CPU optional for core-power info
Currently "-c" is a mandatory option for "core-power info" command. Make this optional as this is a per package/die property. When not specified, it will print info for every package/die. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Diffstat (limited to 'tools/power')
-rw-r--r--tools/power/x86/intel-speed-select/isst-config.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/tools/power/x86/intel-speed-select/isst-config.c b/tools/power/x86/intel-speed-select/isst-config.c
index 3f019f4f90df..c0de18e10cda 100644
--- a/tools/power/x86/intel-speed-select/isst-config.c
+++ b/tools/power/x86/intel-speed-select/isst-config.c
@@ -1763,19 +1763,17 @@ static void dump_clos_info(int arg)
if (cmd_help) {
fprintf(stderr,
"Print Intel Speed Select Technology core power information\n");
- fprintf(stderr, "\tSpecify targeted cpu id with [--cpu|-c]\n");
- exit(0);
- }
-
- if (!max_target_cpus) {
- fprintf(stderr,
- "Invalid target cpu. Specify with [-c|--cpu]\n");
+ fprintf(stderr, "\t Optionally specify targeted cpu id with [--cpu|-c]\n");
exit(0);
}
isst_ctdp_display_information_start(outf);
- for_each_online_target_cpu_in_set(get_clos_info_for_cpu, NULL,
- NULL, NULL, NULL);
+ if (max_target_cpus)
+ for_each_online_target_cpu_in_set(get_clos_info_for_cpu, NULL,
+ NULL, NULL, NULL);
+ else
+ for_each_online_package_in_set(get_clos_info_for_cpu, NULL,
+ NULL, NULL, NULL);
isst_ctdp_display_information_end(outf);
}