Skip to content

Commit 7ee39d8

Browse files
committed
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 <[email protected]> Reviewed-by: Len Brown <[email protected]>
1 parent 5612b2c commit 7ee39d8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tools/power/x86/turbostat/turbostat.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5610,7 +5610,10 @@ void process_cpuid()
56105610

56115611
BIC_PRESENT(BIC_IRQ);
56125612
BIC_PRESENT(BIC_TSC_MHz);
5613+
}
56135614

5615+
void probe_pm_features(void)
5616+
{
56145617
probe_pstates();
56155618

56165619
probe_cstates();
@@ -5630,8 +5633,6 @@ void process_cpuid()
56305633

56315634
if (!quiet)
56325635
decode_misc_feature_control();
5633-
5634-
return;
56355636
}
56365637

56375638
/*
@@ -5912,6 +5913,7 @@ void turbostat_init()
59125913
check_dev_msr();
59135914
check_permissions();
59145915
process_cpuid();
5916+
probe_pm_features();
59155917
linux_perf_init();
59165918

59175919
for_all_cpus(get_cpu_type, ODD_COUNTERS);

0 commit comments

Comments
 (0)