Re: [patch for 2.6.30? 1/2] cpufreq: powernow-k8 cleanup msg if BIOS does not export ACPI _PSS cpufreq data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 19 May 2009 17:22:54 +0200 Thomas Renninger <trenn@xxxxxxx> wrote:

> On Tuesday 12 May 2009 22:25:28 akpm@xxxxxxxxxxxxxxxxxxxx wrote:
> > From: Thomas Renninger <trenn@xxxxxxx>
> > 
> > - Make the message shorter and easier to grep for
> > - Use printk_once instead of WARN_ONCE (functionality of these was 
> mixed up)
> > 
> > Also see bug: http://bugzilla.kernel.org/show_bug.cgi?id=13146
> > for reference.
> 
> I just checked cpufreq linus and fixes trees, nothing happened.
> This one should really go into .30.
> Otherwise Rafael could already track that as a regression.
> 
> You nearly always get this if you upgrade the CPU without the BIOS.
> With the WARN_ONCE patch added in .30-rc1 you now get a huge backtrace
> while this has nothing to do with the kernel and the machine is
> fully functional, so this would be a 2.6.30 regression.
> 
> Can someone please pick it up.
> Ingo: Could this go through x86 tree?

fuggit, eight days later and still I'm owning this patch.  I'll merge
it.

I enhanced the changelog a bit - it isn't obvious why this patch should
be in 2.6.20.  Actually it still isn't obvious, but the patch seems
harmless enough.

From: Thomas Renninger <trenn@xxxxxxx>

- Make the message shorter and easier to grep for
- Use printk_once instead of WARN_ONCE (functionality of these was mixed up)

Also see bug: http://bugzilla.kernel.org/show_bug.cgi?id=13146 for
reference.

(akpm: the kernel warning is misleading - change it to blame sthe BIOS
vendor and not us ;)

Signed-off-by: Thomas Renninger <trenn@xxxxxxx>
Cc: Langsdorf, Mark <mark.langsdorf@xxxxxxx>
Acked-by: Ingo Molnar <mingo@xxxxxxx>
Cc: Dave Jones <davej@xxxxxxxxxxxxxxxxx>
Cc: Leo Milano <lmilano@xxxxxxx>
Cc: "Zhang, Rui" <rui.zhang@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 arch/x86/kernel/cpu/cpufreq/powernow-k8.c |   19 +++++--------------
 1 file changed, 5 insertions(+), 14 deletions(-)

diff -puN arch/x86/kernel/cpu/cpufreq/powernow-k8.c~cpufreq-powernow-k8-cleanup-msg-if-bios-does-not-export-acpi-_pss-cpufreq-data arch/x86/kernel/cpu/cpufreq/powernow-k8.c
--- a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c~cpufreq-powernow-k8-cleanup-msg-if-bios-does-not-export-acpi-_pss-cpufreq-data
+++ a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c
@@ -1234,12 +1234,15 @@ static long __cpuinit powernowk8_cpu_ini
 	return 0;
 }
 
+static const char ACPI_PSS_BIOS_BUG_MSG[] =
+	KERN_ERR FW_BUG PFX "No compatible ACPI _PSS objects found.\n"
+	KERN_ERR FW_BUG PFX "Try again with latest BIOS.\n";
+
 /* per CPU init entry point to the driver */
 static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol)
 {
 	struct powernow_k8_data *data;
 	int rc;
-	static int print_once;
 
 	if (!cpu_online(pol->cpu))
 		return -ENODEV;
@@ -1263,19 +1266,7 @@ static int __cpuinit powernowk8_cpu_init
 		 * an UP version, and is deprecated by AMD.
 		 */
 		if (num_online_cpus() != 1) {
-			/*
-			 * Replace this one with print_once as soon as such a
-			 * thing gets introduced
-			 */
-			if (!print_once) {
-				WARN_ONCE(1, KERN_ERR FW_BUG PFX "Your BIOS "
-					"does not provide ACPI _PSS objects "
-					"in a way that Linux understands. "
-					"Please report this to the Linux ACPI"
-					" maintainers and complain to your "
-					"BIOS vendor.\n");
-				print_once++;
-			}
+			printk_once(ACPI_PSS_BIOS_BUG_MSG);
 			goto err_out;
 		}
 		if (pol->cpu != 0) {
_

--
To unsubscribe from this list: send the line "unsubscribe cpufreq" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Devel]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Forum]     [Linux SCSI]

  Powered by Linux