From: Yinghai Lu <yinghai@kernel.org>
To: "Rafael J. Wysocki" <rjw@sisk.pl>,
Viresh Kumar <viresh.kumar@linaro.org>
Cc: cpufreq@vger.kernel.org, linux-acpi@vger.kernel.org,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
Yinghai Lu <yinghai@kernel.org>
Subject: [PATCH -v2] cpufreq: skip loading acpi_cpufreq after intel_pstate
Date: Fri, 20 Sep 2013 10:43:56 -0700 [thread overview]
Message-ID: <1379699036-7380-1-git-send-email-yinghai@kernel.org> (raw)
If the hw support 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 init_pstate is
already registered
Use cpufreq_get_current_driver() to check if we can skip the
acpi_cpufreq loading.
-v2: update changelog and separate second part to another patch, according
to Viresh.
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
---
drivers/cpufreq/acpi-cpufreq.c | 4 ++++
1 file changed, 4 insertions(+)
Index: linux-2.6/drivers/cpufreq/acpi-cpufreq.c
===================================================================
--- linux-2.6.orig/drivers/cpufreq/acpi-cpufreq.c
+++ linux-2.6/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;
next reply other threads:[~2013-09-20 17:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-20 17:43 Yinghai Lu [this message]
2013-09-20 19:51 ` [PATCH -v2] cpufreq: skip loading acpi_cpufreq after intel_pstate Yinghai Lu
2013-09-26 5:17 ` Yinghai Lu
2013-09-26 5:40 ` Viresh Kumar
2013-09-26 15:41 ` Yinghai Lu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1379699036-7380-1-git-send-email-yinghai@kernel.org \
--to=yinghai@kernel.org \
--cc=cpufreq@vger.kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@sisk.pl \
--cc=viresh.kumar@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).