Skip to content

Commit 3ea8e52

Browse files
dedekindlenb
authored andcommitted
tools/power turbostat: Do not dump TRL if turbo is not supported
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> Signed-off-by: Len Brown <len.brown@intel.com>
1 parent 8e45a9b commit 3ea8e52

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

tools/power/x86/turbostat/turbostat.c

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@ unsigned int do_slm_cstates;
230230
unsigned int use_c1_residency_msr;
231231
unsigned int has_aperf;
232232
unsigned int has_epb;
233+
unsigned int has_turbo;
233234
unsigned int is_hybrid;
234235
unsigned int do_irtl_snb;
235236
unsigned int do_irtl_hsw;
@@ -4080,13 +4081,11 @@ static void remove_underbar(char *s)
40804081
*to = 0;
40814082
}
40824083

4083-
static void dump_cstate_pstate_config_info(unsigned int family, unsigned int model)
4084+
static void dump_turbo_ratio_info(unsigned int family, unsigned int model)
40844085
{
4085-
if (!do_nhm_platform_info)
4086+
if (!has_turbo)
40864087
return;
40874088

4088-
dump_nhm_platform_info();
4089-
40904089
if (has_hsw_turbo_ratio_limit(family, model))
40914090
dump_hsw_turbo_ratio_limits();
40924091

@@ -4108,7 +4107,15 @@ static void dump_cstate_pstate_config_info(unsigned int family, unsigned int mod
41084107

41094108
if (has_config_tdp(family, model))
41104109
dump_config_tdp();
4110+
}
41114111

4112+
static void dump_cstate_pstate_config_info(unsigned int family, unsigned int model)
4113+
{
4114+
if (!do_nhm_platform_info)
4115+
return;
4116+
4117+
dump_nhm_platform_info();
4118+
dump_turbo_ratio_info(family, model);
41124119
dump_nhm_cst_cfg();
41134120
}
41144121

@@ -5508,7 +5515,6 @@ void process_cpuid()
55085515
{
55095516
unsigned int eax, ebx, ecx, edx;
55105517
unsigned int fms, family, model, stepping, ecx_flags, edx_flags;
5511-
unsigned int has_turbo;
55125518
unsigned long long ucode_patch = 0;
55135519

55145520
eax = ebx = ecx = edx = 0;

0 commit comments

Comments
 (0)