diff options
author | Zhang Rui <rui.zhang@intel.com> | 2023-09-13 23:32:39 +0800 |
---|---|---|
committer | Zhang Rui <rui.zhang@intel.com> | 2023-09-27 22:14:21 +0800 |
commit | 7ee39d8d593e3d28eced0fa1a8c8c6bdcbd4156e (patch) | |
tree | 727805230fb2b9b3a8d8850644d7dcb8f73d20e6 /tools/power | |
parent | 5612b2c89bd0a3a2f7c9e8756e6ead971b03f8a3 (diff) | |
download | linux-7ee39d8d593e3d28eced0fa1a8c8c6bdcbd4156e.tar.gz linux-7ee39d8d593e3d28eced0fa1a8c8c6bdcbd4156e.tar.bz2 linux-7ee39d8d593e3d28eced0fa1a8c8c6bdcbd4156e.zip |
tools/power/turbostat: Introduce probe_pm_features()
Feature probe has nothing to do with CPUID, thus it should not be in
process_cpuids().
Introduce probe_pm_features() and move all feature probing functions
into it.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'tools/power')
-rw-r--r-- | tools/power/x86/turbostat/turbostat.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c index ffeee48e8d85..607152b36c1a 100644 --- a/tools/power/x86/turbostat/turbostat.c +++ b/tools/power/x86/turbostat/turbostat.c @@ -5610,7 +5610,10 @@ void process_cpuid() BIC_PRESENT(BIC_IRQ); BIC_PRESENT(BIC_TSC_MHz); +} +void probe_pm_features(void) +{ probe_pstates(); probe_cstates(); @@ -5630,8 +5633,6 @@ void process_cpuid() if (!quiet) decode_misc_feature_control(); - - return; } /* @@ -5912,6 +5913,7 @@ void turbostat_init() check_dev_msr(); check_permissions(); process_cpuid(); + probe_pm_features(); linux_perf_init(); for_all_cpus(get_cpu_type, ODD_COUNTERS); |