Commit 4133be39 authored by Zhang Rui's avatar Zhang Rui Committed by Len Brown
Browse files

tools/power turbostat: Exit on unsupported Intel models



Turbostat requires per-platform enabling for Intel CPU models due to
platform-specific features. When running on unsupported Intel CPU
models, turbostat currently operates with limited default features,
which can lead to users unknowingly using an outdated version of the
tool.

Enhance turbostat to exit by default when run on unsupported Intel CPU
models, with a clear message to users, informing them that their CPU
model is not supported and advising them to update to the latest version
of turbostat for full functionality.

[lenb: updated error message wording]

Signed-off-by: default avatarZhang Rui <rui.zhang@intel.com>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent 9e47f8ad
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1079,6 +1079,10 @@ void probe_platform_features(unsigned int family, unsigned int model)
			return;
		}
	}

	fprintf(stderr, "Unsupported platform detected.\n"
		"\tSee RUN THE LATEST VERSION on turbostat(8)\n");
	exit(1);
}

/* Model specific support End */