From: Andre Przywara <andre.przywara@amd.com>
To: "Rafael J. Wysocki" <rjw@sisk.pl>, Thomas Renninger <trenn@suse.de>
Cc: Matthew Garret <mjg@redhat.com>, <linux-pm@vger.kernel.org>,
<cpufreq@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
Andreas Herrmann <andreas.herrmann3@amd.com>,
Andre Przywara <andre.przywara@amd.com>
Subject: [PATCH 4/8 v2] powernow-k8: delay info messages until initialization has succeeded
Date: Tue, 4 Sep 2012 10:28:05 +0200 [thread overview]
Message-ID: <1346747289-8421-5-git-send-email-andre.przywara@amd.com> (raw)
In-Reply-To: <1346747289-8421-1-git-send-email-andre.przywara@amd.com>
powernow-k8 is quite prematurely crying Hooray and outputs diagnostic
messages, although the actual initialization can still fail.
Since now we may have acpi-cpufreq already loaded, we move the
messages at the end of the init routine to avoid confusing output
if the loading of powernow-k8 should not succeed.
Signed-off-by: Andre Przywara <andre.przywara@amd.com>
---
drivers/cpufreq/powernow-k8.c | 24 ++++++++++++++----------
1 file changed, 14 insertions(+), 10 deletions(-)
diff --git a/drivers/cpufreq/powernow-k8.c b/drivers/cpufreq/powernow-k8.c
index 16c7fb6..8ff0621 100644
--- a/drivers/cpufreq/powernow-k8.c
+++ b/drivers/cpufreq/powernow-k8.c
@@ -1573,9 +1573,6 @@ static int __cpuinit powernowk8_init(void)
if (supported_cpus != num_online_cpus())
return -ENODEV;
- printk(KERN_INFO PFX "Found %d %s (%d cpu cores) (" VERSION ")\n",
- num_online_nodes(), boot_cpu_data.x86_model_id, supported_cpus);
-
if (boot_cpu_has(X86_FEATURE_CPB)) {
cpb_capable = true;
@@ -1594,16 +1591,23 @@ static int __cpuinit powernowk8_init(void)
struct msr *reg = per_cpu_ptr(msrs, cpu);
cpb_enabled |= !(!!(reg->l & BIT(25)));
}
-
- printk(KERN_INFO PFX "Core Performance Boosting: %s.\n",
- (cpb_enabled ? "on" : "off"));
}
rv = cpufreq_register_driver(&cpufreq_amd64_driver);
- if (rv < 0 && boot_cpu_has(X86_FEATURE_CPB)) {
- unregister_cpu_notifier(&cpb_nb);
- msrs_free(msrs);
- msrs = NULL;
+
+ if (!rv)
+ pr_info(PFX "Found %d %s (%d cpu cores) (" VERSION ")\n",
+ num_online_nodes(), boot_cpu_data.x86_model_id,
+ supported_cpus);
+
+ if (boot_cpu_has(X86_FEATURE_CPB)) {
+ if (rv < 0) {
+ unregister_cpu_notifier(&cpb_nb);
+ msrs_free(msrs);
+ msrs = NULL;
+ } else
+ pr_info(PFX "Core Performance Boosting: %s.\n",
+ (cpb_enabled ? "on" : "off"));
}
return rv;
}
--
1.7.12
next prev parent reply other threads:[~2012-09-04 8:27 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-04 8:28 [PATCH 0/8 v2] acpi-cpufreq: Move modern AMD cpufreq support to acpi-cpufreq Andre Przywara
2012-09-04 8:28 ` [PATCH 1/8 v2] acpi-cpufreq: Add support for modern AMD CPUs Andre Przywara
2012-09-04 8:28 ` [PATCH 2/8 v2] acpi-cpufreq: Add quirk to disable _PSD usage on all " Andre Przywara
[not found] ` <CACJDEmrOoZ_azqTrtfoGC-O=H0V=AHy8VExoFYYPhbUUx+7UAg@mail.gmail.com>
2012-09-17 7:41 ` Andre Przywara
2012-09-17 11:40 ` Thomas Renninger
2012-09-04 8:28 ` [PATCH 3/8 v2] cpufreq: Add warning message to powernow-k8 Andre Przywara
2012-09-04 8:28 ` Andre Przywara [this message]
2012-09-04 8:28 ` [PATCH 5/8 v2] ACPI: Add fixups for AMD P-state figures Andre Przywara
2012-09-04 8:28 ` [PATCH 6/8 v2] acpi-cpufreq: Add support for disabling dynamic overclocking Andre Przywara
2012-09-04 8:28 ` [PATCH 7/8 v2] acpi-cpufreq: Add compatibility for legacy AMD cpb sysfs knob Andre Przywara
2012-09-04 8:28 ` [PATCH 8/8 v2] cpufreq: Remove support for hardware P-state chips from powernow-k8 Andre Przywara
2012-09-05 13:46 ` [PATCH 0/8 v2] acpi-cpufreq: Move modern AMD cpufreq support to acpi-cpufreq Rafael J. Wysocki
2012-09-05 14:25 ` Thomas Renninger
2012-09-05 15:05 ` Andre Przywara
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=1346747289-8421-5-git-send-email-andre.przywara@amd.com \
--to=andre.przywara@amd.com \
--cc=andreas.herrmann3@amd.com \
--cc=cpufreq@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mjg@redhat.com \
--cc=rjw@sisk.pl \
--cc=trenn@suse.de \
/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).