Skip to content

Commit

Permalink
tools/power/x86/intel-speed-select: Remove cpu mask display for non-c…
Browse files Browse the repository at this point in the history
…pu power domain

Non CPU power domains will not have any CPUs. So don't display any CPU
count or enable mask.

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
[srinivas.pandruvada@linux.intel.com: subject and changelog edits]
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
  • Loading branch information
Zhang Rui authored and Srinivas Pandruvada committed Mar 22, 2023
1 parent c5a295c commit c7ff8ff
Showing 1 changed file with 23 additions and 21 deletions.
44 changes: 23 additions & 21 deletions tools/power/x86/intel-speed-select/isst-display.c
Original file line number Diff line number Diff line change
Expand Up @@ -356,31 +356,33 @@ void isst_ctdp_display_information(struct isst_id *id, FILE *outf, int tdp_level
ctdp_level->level);
format_and_print(outf, level + 1, header, NULL);

snprintf(header, sizeof(header), "cpu-count");
j = get_cpu_count(id);
snprintf(value, sizeof(value), "%d", j);
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");
if (id->cpu >= 0) {
snprintf(header, sizeof(header), "cpu-count");
j = get_cpu_count(id);
snprintf(value, sizeof(value), "%d", j);
format_and_print(outf, level + 2, header, value);
}

if (ctdp_level->core_cpumask_size) {
snprintf(header, sizeof(header), "enable-cpu-mask");
printcpumask(sizeof(value), value,
ctdp_level->core_cpumask_size,
ctdp_level->core_cpumask);
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);
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);
if (ctdp_level->core_cpumask_size) {
snprintf(header, sizeof(header), "enable-cpu-mask");
printcpumask(sizeof(value), value,
ctdp_level->core_cpumask_size,
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");
Expand Down

0 comments on commit c7ff8ff

Please sign in to comment.