From: Yinghai Lu Date: Fri, 20 Sep 2013 17:43:56 +0000 (-0700) Subject: acpi-cpufreq: skip loading acpi_cpufreq after intel_pstate X-Git-Tag: MMI-PSA29.97-13-9~13542^2^2~2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8a61e12e84597b5f8155ac91b44dea866ccfaac2;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git 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 Signed-off-by: Rafael J. Wysocki --- 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) { int ret; + /* don't keep reloading if cpufreq_driver exists */ + if (cpufreq_get_current_driver()) + return 0; + if (acpi_disabled) return 0;