summaryrefslogtreecommitdiffstats
path: root/tools/power
diff options
context:
space:
mode:
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>2020-06-30 19:45:36 +0200
committerSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>2020-07-16 19:17:33 +0200
commit6374de848966966bad9472ed3681a069a8db5a6f (patch)
tree52ec690637630583b7d06bcc04d77824e383ba8a /tools/power
parenttools/power/x86/intel-speed-select: Change path for caching topology info (diff)
downloadlinux-6374de848966966bad9472ed3681a069a8db5a6f.tar.xz
linux-6374de848966966bad9472ed3681a069a8db5a6f.zip
tools/power/x86/intel-speed-select: Ignore -o option processing on error
When for some reason, CONFIG_TDP_GET_CORE_MASK mailbox command fails, then don't continue online/offline operation for perf-profile set-config-level with "-o" option. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Diffstat (limited to 'tools/power')
-rw-r--r--tools/power/x86/intel-speed-select/isst-config.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/power/x86/intel-speed-select/isst-config.c b/tools/power/x86/intel-speed-select/isst-config.c
index 2d10def3fc00..0a5c1744db95 100644
--- a/tools/power/x86/intel-speed-select/isst-config.c
+++ b/tools/power/x86/intel-speed-select/isst-config.c
@@ -1247,7 +1247,11 @@ static void set_tdp_level_for_cpu(int cpu, void *arg1, void *arg2, void *arg3,
fprintf(stderr, "Option is set to online/offline\n");
ctdp_level.core_cpumask_size =
alloc_cpu_set(&ctdp_level.core_cpumask);
- isst_get_coremask_info(cpu, tdp_level, &ctdp_level);
+ ret = isst_get_coremask_info(cpu, tdp_level, &ctdp_level);
+ if (ret) {
+ isst_display_error_info_message(1, "Can't get coremask, online/offline option is ignored", 0, 0);
+ return;
+ }
if (ctdp_level.cpu_count) {
int i, max_cpus = get_topo_max_cpus();
for (i = 0; i < max_cpus; ++i) {