* [PATCH] turbostat: do not dump TRL if turbo is not supported
@ 2022-09-16 11:59 Artem Bityutskiy
0 siblings, 0 replies; only message in thread
From: Artem Bityutskiy @ 2022-09-16 11:59 UTC (permalink / raw)
To: Len Brown
Cc: Rafael J. Wysocki, Rui Zhang, Yu Chen, Linux PM Mailing List,
Artem Bityutskiy
From: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Do not dump turbo ratio limits if platform does not support turbo, because it
is confusing and the TRL MSRs may even include misleading information. And they
are not supposed to be relied on if turbo is not supported.
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
---
tools/power/x86/turbostat/turbostat.c | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c
index 831dc32d45fa..d0aa72827c71 100644
--- a/tools/power/x86/turbostat/turbostat.c
+++ b/tools/power/x86/turbostat/turbostat.c
@@ -230,6 +230,7 @@ unsigned int do_slm_cstates;
unsigned int use_c1_residency_msr;
unsigned int has_aperf;
unsigned int has_epb;
+unsigned int has_turbo;
unsigned int is_hybrid;
unsigned int do_irtl_snb;
unsigned int do_irtl_hsw;
@@ -4080,13 +4081,11 @@ static void remove_underbar(char *s)
*to = 0;
}
-static void dump_cstate_pstate_config_info(unsigned int family, unsigned int model)
+static void dump_turbo_ratio_info(unsigned int family, unsigned int model)
{
- if (!do_nhm_platform_info)
+ if (!has_turbo)
return;
- dump_nhm_platform_info();
-
if (has_hsw_turbo_ratio_limit(family, model))
dump_hsw_turbo_ratio_limits();
@@ -4108,7 +4107,15 @@ static void dump_cstate_pstate_config_info(unsigned int family, unsigned int mod
if (has_config_tdp(family, model))
dump_config_tdp();
+}
+static void dump_cstate_pstate_config_info(unsigned int family, unsigned int model)
+{
+ if (!do_nhm_platform_info)
+ return;
+
+ dump_nhm_platform_info();
+ dump_turbo_ratio_info(family, model);
dump_nhm_cst_cfg();
}
@@ -5505,7 +5512,6 @@ void process_cpuid()
{
unsigned int eax, ebx, ecx, edx;
unsigned int fms, family, model, stepping, ecx_flags, edx_flags;
- unsigned int has_turbo;
unsigned long long ucode_patch = 0;
eax = ebx = ecx = edx = 0;
--
2.37.3
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-09-16 12:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-16 11:59 [PATCH] turbostat: do not dump TRL if turbo is not supported Artem Bityutskiy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).