diff options
author | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2022-07-26 18:29:33 +0300 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2022-07-28 21:37:19 +0300 |
commit | eade39b2bf7f35294a814e62e2f5d8117615f18b (patch) | |
tree | a7a720611db32e2bd3c86703198293d71bfc001f /tools | |
parent | 684e40e99e594e0da1dc1b358fbd51c03c606e75 (diff) | |
download | linux-eade39b2bf7f35294a814e62e2f5d8117615f18b.tar.xz |
tools/power turbostat: cleanup 'automatic_cstate_conversion_probe()'
The 'automatic_cstate_conversion_probe()' function has a too long 'if'
statement, convert it to a 'switch' statement in order to improve code
readability a bit.
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/power/x86/turbostat/turbostat.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c index 33b74e15b036..3ec10d141abb 100644 --- a/tools/power/x86/turbostat/turbostat.c +++ b/tools/power/x86/turbostat/turbostat.c @@ -4816,8 +4816,16 @@ void perf_limit_reasons_probe(unsigned int family, unsigned int model) void automatic_cstate_conversion_probe(unsigned int family, unsigned int model) { - if (is_skx(family, model) || is_bdx(family, model) || is_icx(family, model) || is_spr(family, model)) + if (family != 6) + return; + + switch (model) { + case INTEL_FAM6_BROADWELL_X: + case INTEL_FAM6_SKYLAKE_X: + case INTEL_FAM6_ICELAKE_X: + case INTEL_FAM6_SAPPHIRERAPIDS_X: has_automatic_cstate_conversion = 1; + } } void prewake_cstate_probe(unsigned int family, unsigned int model) |