All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <ak@muc.de>
To: paul.devriendt@amd.com, cpufreq@www.linux.org.uk
Subject: [PATCH] Fix cosmetic issue in powernow-k8 error handling
Date: Mon, 09 Aug 2004 20:26:38 +0200	[thread overview]
Message-ID: <m3acx4tbfl.fsf@averell.firstfloor.org> (raw)


I tried to load the new SMP capable powernow k8 driver on a machine
with an too old BIOS. I got a lot of cryptic "init not cpu 0"
messages until the "MP systems not supported by PSB ..." message.

This patch switches the order of the checks around to print the
other message first. It will be still printed multiple times
because the cpufreq setup will probe all CPUs, but that's probably
ok.

BTW I also looked at converting the code to smp_call_function 
(because Paul complained about the set_cpus_allowed in his OLS
presentation). But the code would have been more complicated with
this change so I left it like it is.

-Andi

diff -u linux-2.6.8rc3-amd64/arch/i386/kernel/cpu/cpufreq/powernow-k8.c-o linux-2.6.8rc3-amd64/arch/i386/kernel/cpu/cpufreq/powernow-k8.c
--- linux-2.6.8rc3-amd64/arch/i386/kernel/cpu/cpufreq/powernow-k8.c-o	2004-06-16 12:22:43.000000000 +0200
+++ linux-2.6.8rc3-amd64/arch/i386/kernel/cpu/cpufreq/powernow-k8.c	2004-08-09 19:52:17.000000000 +0200
@@ -948,13 +948,13 @@
 		 * an UP version, and is deprecated by AMD.
 		 */
 
-		if (pol->cpu != 0) {
-			printk(KERN_ERR PFX "init not cpu 0\n");
+		if ((num_online_cpus() != 1) || (num_possible_cpus() != 1)) {
+			printk(KERN_INFO PFX "MP systems not supported by PSB BIOS structure\n");
 			kfree(data);
 			return -ENODEV;
 		}
-		if ((num_online_cpus() != 1) || (num_possible_cpus() != 1)) {
-			printk(KERN_INFO PFX "MP systems not supported by PSB BIOS structure\n");
+		if (pol->cpu != 0) {
+			printk(KERN_ERR PFX "init not cpu 0\n");
 			kfree(data);
 			return -ENODEV;
 		}

                 reply	other threads:[~2004-08-09 18:26 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=m3acx4tbfl.fsf@averell.firstfloor.org \
    --to=ak@muc.de \
    --cc=cpufreq@www.linux.org.uk \
    --cc=paul.devriendt@amd.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.