Skip to content

Commit 6374de8

Browse files
committed
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 <[email protected]>
1 parent b1d12ce commit 6374de8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tools/power/x86/intel-speed-select/isst-config.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1247,7 +1247,11 @@ static void set_tdp_level_for_cpu(int cpu, void *arg1, void *arg2, void *arg3,
12471247
fprintf(stderr, "Option is set to online/offline\n");
12481248
ctdp_level.core_cpumask_size =
12491249
alloc_cpu_set(&ctdp_level.core_cpumask);
1250-
isst_get_coremask_info(cpu, tdp_level, &ctdp_level);
1250+
ret = isst_get_coremask_info(cpu, tdp_level, &ctdp_level);
1251+
if (ret) {
1252+
isst_display_error_info_message(1, "Can't get coremask, online/offline option is ignored", 0, 0);
1253+
return;
1254+
}
12511255
if (ctdp_level.cpu_count) {
12521256
int i, max_cpus = get_topo_max_cpus();
12531257
for (i = 0; i < max_cpus; ++i) {

0 commit comments

Comments
 (0)