Skip to content

Commit

Permalink
acpi-cpufreq: skip loading acpi_cpufreq after intel_pstate
Browse files Browse the repository at this point in the history
If the hw supports intel_pstate and acpi_cpufreq, intel_pstate will
get loaded first.

acpi_cpufreq_init() will call acpi_cpufreq_early_init()
and that will allocate perf data and init those perf data in ACPI core,
(that will cover all CPUs). But later it will free them as
cpufreq_register_driver(acpi_cpufreq) will fail as intel_pstate is
already registered

Use cpufreq_get_current_driver() to check if we can skip the
acpi_cpufreq loading.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Yinghai Lu authored and Rafael J. Wysocki committed Sep 25, 2013
1 parent 4a10c2a commit 8a61e12
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/cpufreq/acpi-cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -986,6 +986,10 @@ static int __init acpi_cpufreq_init(void)
{
int ret;

/* don't keep reloading if cpufreq_driver exists */
if (cpufreq_get_current_driver())
return 0;

if (acpi_disabled)
return 0;

Expand Down

0 comments on commit 8a61e12

Please sign in to comment.