mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
x86/cpufreq: use host CPU policy for Turbo checking
There's no need to invoke CPUID yet another time - we assume symmetry anyway. With symmetry assumed, logging per-CPU also isn't very useful. Signed-off-by: Jan Beulich <jbeulich@suse.com> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com> Reviewed-by: Jason Andryuk <jason.andryuk@amd.com>
This commit is contained in:
1 parent
894bd76179
commit
dc4d5f1ef6
2 files changed
+5
-7
No files matched your search
@@ -220,14 +220,11 @@ static unsigned int cf_check get_cur_freq_on_cpu(unsigned int cpu)
|
||||
|
||||
void intel_feature_detect(struct cpufreq_policy *policy)
|
||||
{
|
||||
unsigned int eax;
|
||||
|
||||
eax = cpuid_eax(6);
|
||||
if (eax & 0x2) {
|
||||
if ( cpu_has_turbo_boost )
|
||||
{
|
||||
policy->turbo = CPUFREQ_TURBO_ENABLED;
|
||||
if (cpufreq_verbose)
|
||||
printk(XENLOG_INFO "CPU%u: Turbo Mode detected and enabled\n",
|
||||
smp_processor_id());
|
||||
if ( cpufreq_verbose )
|
||||
printk_once(XENLOG_INFO "Turbo Mode detected and enabled\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -177,6 +177,7 @@ static inline bool boot_cpu_has(unsigned int feat)
|
||||
#define cpu_has_tbm boot_cpu_has(X86_FEATURE_TBM)
|
||||
|
||||
/* CPUID level 0x00000006.eax */
|
||||
#define cpu_has_turbo_boost host_cpu_policy.basic.turbo_boost
|
||||
#define cpu_has_arat host_cpu_policy.basic.arat
|
||||
|
||||
/* CPUID level 0x00000006.ecx */
|
||||
|
||||