[PATCH 2/3] tools/power/x86/intel-speed-select: Print Version info when Incompatible API version is detected
From: Zhang Rui
Date: Thu Mar 19 2026 - 01:55:40 EST
When running an old version intel-speed-select tool on newer platforms,
even with "intel-speed-select -v", the tool only complains about
"Incompatible API version", without giving the current version info.
Print Version info whenever Incompatible API version is detected.
Signed-off-by: Zhang Rui <rui.zhang@xxxxxxxxx>
---
tools/power/x86/intel-speed-select/isst-config.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/tools/power/x86/intel-speed-select/isst-config.c b/tools/power/x86/intel-speed-select/isst-config.c
index bd9f7a1d385e..afef3af8b446 100644
--- a/tools/power/x86/intel-speed-select/isst-config.c
+++ b/tools/power/x86/intel-speed-select/isst-config.c
@@ -82,6 +82,11 @@ struct cpu_topology {
static int read_only;
+static void print_version(void)
+{
+ fprintf(outf, "Version %s\n", version_str);
+}
+
static void check_privilege(void)
{
if (!read_only)
@@ -1137,6 +1142,7 @@ static int isst_fill_platform_info(void)
close(fd);
if (isst_platform_info.api_version > supported_api_ver) {
+ print_version();
printf("Incompatible API versions; Upgrade of tool is required\n");
exit(1);
}
@@ -3194,12 +3200,6 @@ static void usage(void)
exit(0);
}
-static void print_version(void)
-{
- fprintf(outf, "Version %s\n", version_str);
- exit(0);
-}
-
static void cmdline(int argc, char **argv)
{
const char *pathname = "/dev/isst_interface";
@@ -3311,6 +3311,7 @@ static void cmdline(int argc, char **argv)
break;
case 'v':
print_version();
+ exit(0);
break;
case 'b':
oob_mode = 1;
--
2.43.0