tools/power/x86/intel-speed-select: Format get-assoc information

Format the get-assoc command output consistant with other commands.
For example:

Intel(R) Speed Select Technology
Executing on CPU model:142[0x8e]
 package-0
  die-0
    cpu-0
      get-assoc
        clos:0

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
This commit is contained in:
Srinivas Pandruvada
2019-09-14 12:45:45 -07:00
committed by Andy Shevchenko
parent 3c64c81ad1
commit e118fbe366
3 changed files with 33 additions and 6 deletions

View File

@@ -503,6 +503,29 @@ void isst_clos_display_information(int cpu, FILE *outf, int clos,
format_and_print(outf, 1, NULL, NULL);
}
void isst_clos_display_assoc_information(int cpu, FILE *outf, int clos)
{
char header[256];
char value[256];
snprintf(header, sizeof(header), "package-%d",
get_physical_package_id(cpu));
format_and_print(outf, 1, header, NULL);
snprintf(header, sizeof(header), "die-%d", get_physical_die_id(cpu));
format_and_print(outf, 2, header, NULL);
snprintf(header, sizeof(header), "cpu-%d", cpu);
format_and_print(outf, 3, header, NULL);
snprintf(header, sizeof(header), "get-assoc");
format_and_print(outf, 4, header, NULL);
snprintf(header, sizeof(header), "clos");
snprintf(value, sizeof(value), "%d", clos);
format_and_print(outf, 5, header, value);
format_and_print(outf, 1, NULL, NULL);
}
void isst_display_result(int cpu, FILE *outf, char *feature, char *cmd,
int result)
{