Skip to content

Commit

Permalink
[CPUFREQ] Handle CPUs with different capabilities in acpi-cpufreq
Browse files Browse the repository at this point in the history
acpi-cpufreq checks each CPU for aperf/mperf support, but only sets a
global flag. This will cause errors if some CPUs in the system don't
support the feature. Check boot_cpu_has() instead in order to make sure
that all CPUs support it.

Signed-off-by: Matthew Garrett <[email protected]>
Signed-off-by: Dave Jones <[email protected]>
  • Loading branch information
Matthew Garrett authored and Dave Jones committed Jul 13, 2011
1 parent 8d86e5f commit 92e03c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/cpufreq/acpi-cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,7 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy)
acpi_processor_notify_smm(THIS_MODULE);

/* Check for APERF/MPERF support in hardware */
if (cpu_has(c, X86_FEATURE_APERFMPERF))
if (boot_cpu_has(X86_FEATURE_APERFMPERF))
acpi_cpufreq_driver.getavg = cpufreq_get_measured_perf;

pr_debug("CPU%u - ACPI performance management activated.\n", cpu);
Expand Down

0 comments on commit 92e03c4

Please sign in to comment.