Commit c7ff8ff3 authored by Zhang Rui's avatar Zhang Rui Committed by Srinivas Pandruvada

tools/power/x86/intel-speed-select: Remove cpu mask display for non-cpu power domain

Non CPU power domains will not have any CPUs. So don't display any CPU
count or enable mask.
Signed-off-by: default avatarZhang Rui <rui.zhang@intel.com>
[srinivas.pandruvada@linux.intel.com: subject and changelog edits]
Signed-off-by: default avatarSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
parent c5a295ca
...@@ -356,31 +356,33 @@ void isst_ctdp_display_information(struct isst_id *id, FILE *outf, int tdp_level ...@@ -356,31 +356,33 @@ void isst_ctdp_display_information(struct isst_id *id, FILE *outf, int tdp_level
ctdp_level->level); ctdp_level->level);
format_and_print(outf, level + 1, header, NULL); format_and_print(outf, level + 1, header, NULL);
snprintf(header, sizeof(header), "cpu-count"); if (id->cpu >= 0) {
j = get_cpu_count(id); snprintf(header, sizeof(header), "cpu-count");
snprintf(value, sizeof(value), "%d", j); j = get_cpu_count(id);
format_and_print(outf, level + 2, header, value);
j = CPU_COUNT_S(ctdp_level->core_cpumask_size,
ctdp_level->core_cpumask);
if (j) {
snprintf(header, sizeof(header), "enable-cpu-count");
snprintf(value, sizeof(value), "%d", j); snprintf(value, sizeof(value), "%d", j);
format_and_print(outf, level + 2, header, value); format_and_print(outf, level + 2, header, value);
}
if (ctdp_level->core_cpumask_size) { j = CPU_COUNT_S(ctdp_level->core_cpumask_size,
snprintf(header, sizeof(header), "enable-cpu-mask"); ctdp_level->core_cpumask);
printcpumask(sizeof(value), value, if (j) {
ctdp_level->core_cpumask_size, snprintf(header, sizeof(header), "enable-cpu-count");
ctdp_level->core_cpumask); snprintf(value, sizeof(value), "%d", j);
format_and_print(outf, level + 2, header, value); format_and_print(outf, level + 2, header, value);
}
snprintf(header, sizeof(header), "enable-cpu-list"); if (ctdp_level->core_cpumask_size) {
printcpulist(sizeof(value), value, snprintf(header, sizeof(header), "enable-cpu-mask");
ctdp_level->core_cpumask_size, printcpumask(sizeof(value), value,
ctdp_level->core_cpumask); ctdp_level->core_cpumask_size,
format_and_print(outf, level + 2, header, value); ctdp_level->core_cpumask);
format_and_print(outf, level + 2, header, value);
snprintf(header, sizeof(header), "enable-cpu-list");
printcpulist(sizeof(value), value,
ctdp_level->core_cpumask_size,
ctdp_level->core_cpumask);
format_and_print(outf, level + 2, header, value);
}
} }
snprintf(header, sizeof(header), "thermal-design-power-ratio"); snprintf(header, sizeof(header), "thermal-design-power-ratio");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment