diff options
author | Yinghai Lu <yinghai@kernel.org> | 2013-09-20 13:43:56 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-09-24 21:19:09 -0400 |
commit | 8a61e12e84597b5f8155ac91b44dea866ccfaac2 (patch) | |
tree | ad5b14b1f1ad4acd0fc19e61ba34091d32ccc3b5 /drivers/cpufreq | |
parent | 4a10c2ac2f368583138b774ca41fac4207911983 (diff) |
acpi-cpufreq: skip loading acpi_cpufreq after intel_pstate
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>
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r-- | drivers/cpufreq/acpi-cpufreq.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/cpufreq/acpi-cpufreq.c b/drivers/cpufreq/acpi-cpufreq.c index a1260b4549db..d2c3253e015e 100644 --- a/drivers/cpufreq/acpi-cpufreq.c +++ b/drivers/cpufreq/acpi-cpufreq.c | |||
@@ -986,6 +986,10 @@ static int __init acpi_cpufreq_init(void) | |||
986 | { | 986 | { |
987 | int ret; | 987 | int ret; |
988 | 988 | ||
989 | /* don't keep reloading if cpufreq_driver exists */ | ||
990 | if (cpufreq_get_current_driver()) | ||
991 | return 0; | ||
992 | |||
989 | if (acpi_disabled) | 993 | if (acpi_disabled) |
990 | return 0; | 994 | return 0; |
991 | 995 | ||