aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools/power/x86/intel-speed-select/isst-display.c
diff options
context:
space:
mode:
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>2019-09-14 12:45:45 -0700
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>2019-09-19 14:51:29 +0300
commite118fbe366d817175b2c47bfa338959bbff5bd37 (patch)
treeb094ebfcc4fa45492c7d466315665bf061209716 /tools/power/x86/intel-speed-select/isst-display.c
parenttools/power/x86/intel-speed-select: Allow online/offline based on tdp (diff)
downloadwireguard-linux-e118fbe366d817175b2c47bfa338959bbff5bd37.tar.xz
wireguard-linux-e118fbe366d817175b2c47bfa338959bbff5bd37.zip
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>
Diffstat (limited to 'tools/power/x86/intel-speed-select/isst-display.c')
-rw-r--r--tools/power/x86/intel-speed-select/isst-display.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/tools/power/x86/intel-speed-select/isst-display.c b/tools/power/x86/intel-speed-select/isst-display.c
index df4aa99c4e92..bd7aaf27e4de 100644
--- a/tools/power/x86/intel-speed-select/isst-display.c
+++ b/tools/power/x86/intel-speed-select/isst-display.c
@@ -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)
{