Skip to content

Commit

Permalink
tools/power/turbostat: Introduce probe_pm_features()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
zhang-rui committed Sep 27, 2023
1 parent 5612b2c commit 7ee39d8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tools/power/x86/turbostat/turbostat.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -5630,8 +5633,6 @@ void process_cpuid()

if (!quiet)
decode_misc_feature_control();

return;
}

/*
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 7ee39d8

Please sign in to comment.