diff options
author | Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> | 2020-06-30 10:45:36 -0700 |
---|---|---|
committer | Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> | 2020-07-16 10:17:33 -0700 |
commit | 6374de848966966bad9472ed3681a069a8db5a6f (patch) | |
tree | 52ec690637630583b7d06bcc04d77824e383ba8a | |
parent | b1d12cef7c0abe60e7524c3ac2821b7a4d29fede (diff) | |
download | linux-6374de848966966bad9472ed3681a069a8db5a6f.tar.bz2 |
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>
-rw-r--r-- | tools/power/x86/intel-speed-select/isst-config.c | 6 |
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) { |