Skip to content

Commit cf4e0f8

Browse files
committed
Merge branch 'turbostat' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux
Pull turbostat changes for 6.1-rc1 from Len Brown: "Add support for two new platforms, and two bug fixes on existing platforms." * 'turbostat' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux: tools/power turbostat: version 2022.10.04 tools/power turbostat: Use standard Energy Unit for SPR Dram RAPL domain tools/power turbostat: Do not dump TRL if turbo is not supported tools/power turbostat: Add support for MeteorLake platforms tools/power turbostat: Add support for RPL-S
2 parents c79e6fa + 9992dd7 commit cf4e0f8

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

tools/power/x86/turbostat/turbostat.c

Lines changed: 15 additions & 7 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+
}
4111+
4112+
static void dump_cstate_pstate_config_info(unsigned int family, unsigned int model)
4113+
{
4114+
if (!do_nhm_platform_info)
4115+
return;
41114116

4117+
dump_nhm_platform_info();
4118+
dump_turbo_ratio_info(family, model);
41124119
dump_nhm_cst_cfg();
41134120
}
41144121

@@ -4560,7 +4567,6 @@ static double rapl_dram_energy_units_probe(int model, double rapl_energy_units)
45604567
case INTEL_FAM6_SKYLAKE_X: /* SKX */
45614568
case INTEL_FAM6_XEON_PHI_KNL: /* KNL */
45624569
case INTEL_FAM6_ICELAKE_X: /* ICX */
4563-
case INTEL_FAM6_SAPPHIRERAPIDS_X: /* SPR */
45644570
return (rapl_dram_energy_units = 15.3 / 1000000);
45654571
default:
45664572
return (rapl_energy_units);
@@ -5447,6 +5453,9 @@ unsigned int intel_model_duplicates(unsigned int model)
54475453
case INTEL_FAM6_ALDERLAKE_N:
54485454
case INTEL_FAM6_RAPTORLAKE:
54495455
case INTEL_FAM6_RAPTORLAKE_P:
5456+
case INTEL_FAM6_RAPTORLAKE_S:
5457+
case INTEL_FAM6_METEORLAKE:
5458+
case INTEL_FAM6_METEORLAKE_L:
54505459
return INTEL_FAM6_CANNONLAKE_L;
54515460

54525461
case INTEL_FAM6_ATOM_TREMONT_L:
@@ -5505,7 +5514,6 @@ void process_cpuid()
55055514
{
55065515
unsigned int eax, ebx, ecx, edx;
55075516
unsigned int fms, family, model, stepping, ecx_flags, edx_flags;
5508-
unsigned int has_turbo;
55095517
unsigned long long ucode_patch = 0;
55105518

55115519
eax = ebx = ecx = edx = 0;
@@ -6217,7 +6225,7 @@ int get_and_dump_counters(void)
62176225

62186226
void print_version()
62196227
{
6220-
fprintf(outf, "turbostat version 2022.07.28 - Len Brown <[email protected]>\n");
6228+
fprintf(outf, "turbostat version 2022.10.04 - Len Brown <[email protected]>\n");
62216229
}
62226230

62236231
#define COMMAND_LINE_SIZE 2048

0 commit comments

Comments
 (0)