summaryrefslogtreecommitdiff
path: root/tools/power/x86/turbostat/turbostat.c
diff options
context:
space:
mode:
authorZhang Rui <rui.zhang@intel.com>2023-08-27 14:47:30 +0800
committerZhang Rui <rui.zhang@intel.com>2023-09-27 22:14:20 +0800
commit9cc1c1038526a5b6c9a57397def80ba79c260ff2 (patch)
treec2efd2722fbfe5c7b989b880f098cbbe7f54b0ae /tools/power/x86/turbostat/turbostat.c
parent76d83d2ae8e3099d9a6bd67fba918108824d7d4d (diff)
tools/power/turbostat: Abstract MSR_MODULE_C6_RES_MS support
Abstract MSR_MODULE_C6_RES_MS support. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Reviewed-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'tools/power/x86/turbostat/turbostat.c')
-rw-r--r--tools/power/x86/turbostat/turbostat.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c
index de9260c96678..5f90d96bd9e3 100644
--- a/tools/power/x86/turbostat/turbostat.c
+++ b/tools/power/x86/turbostat/turbostat.c
@@ -284,6 +284,7 @@ struct platform_features {
bool has_cst_auto_convension; /* AUTOMATIC_CSTATE_CONVERSION bit in MSR_PKG_CST_CONFIG_CONTROL */
bool has_irtl_msrs; /* MSR_PKGC3/PKGC6/PKGC7/PKGC8/PKGC9/PKGC10_IRTL */
bool has_msr_core_c1_res; /* MSR_CORE_C1_RES */
+ bool has_msr_module_c6_res_ms; /* MSR_MODULE_C6_RES_MS */
int trl_msrs; /* MSR_TURBO_RATIO_LIMIT/LIMIT1/LIMIT2/SECONDARY, Atom TRL MSRs */
int plr_msrs; /* MSR_CORE/GFX/RING_PERF_LIMIT_REASONS */
int rapl_msrs; /* RAPL PKG/DRAM/CORE/GFX MSRs, AMD RAPL MSRs */
@@ -653,6 +654,7 @@ static const struct platform_features slv_features = {
.supported_cstates = CC1 | CC6 | PC6,
.cst_limit = CST_LIMIT_SLV,
.has_msr_core_c1_res = 1,
+ .has_msr_module_c6_res_ms = 1,
.trl_msrs = TRL_ATOM,
.rapl_msrs = RAPL_PKG | RAPL_CORE,
.has_rapl_divisor = 1,
@@ -5690,9 +5692,9 @@ void process_cpuid()
BIC_PRESENT(BIC_SMI);
probe_bclk();
- if (has_slv_msrs(family, model)) {
+ if (platform->has_msr_module_c6_res_ms)
BIC_PRESENT(BIC_Mod_c6);
- }
+
if (has_skl_msrs(family, model)) {
BIC_PRESENT(BIC_Totl_c0);
BIC_PRESENT(BIC_Any_c0);