lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20090203210947.49fc5933.akpm@linux-foundation.org>
Date:	Tue, 3 Feb 2009 21:09:47 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Thomas Renninger <trenn@...e.de>
Cc:	davej@...emonkey.org.uk, mark.langsdorf@....com,
	cpufreq@...r.kernel.org, venkatesh.pallipadi@...el.com,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 6/7] CPUFREQ: powernow-k8: Only print error message
 once, not per core.

On Tue,  3 Feb 2009 17:46:45 +0100 Thomas Renninger <trenn@...e.de> wrote:

> This is the typical message you get if you plug in a CPU
> which is newer than your BIOS. It's annoying seeing this
> message for each core.
> 
> Signed-off-by: Thomas Renninger <trenn@...e.de>
> ---
>  arch/x86/kernel/cpu/cpufreq/powernow-k8.c |   12 ++++++------
>  1 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c
> index 9accffb..9e312c5 100644
> --- a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c
> +++ b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c
> @@ -743,7 +743,7 @@ static int find_psb_table(struct powernow_k8_data *data)
>  	 * BIOS and Kernel Developer's Guide, which is available on
>  	 * www.amd.com
>  	 */
> -	printk(KERN_ERR PFX "BIOS error - no PSB or ACPI _PSS objects\n");
> +	printk(KERN_ERR FW_BUG PFX "No PSB or ACPI _PSS objects\n");
>  	return -ENODEV;
>  }
>  
> @@ -1154,11 +1154,11 @@ static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol)
>  		 * an UP version, and is deprecated by AMD.
>  		 */
>  		if (num_online_cpus() != 1) {
> -			printk(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");
> +			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");
>  			goto err_out;
>  		}
>  		if (pol->cpu != 0) {

WARN_ONCE will also spew a stack backtrace, which seems inappropriate here.

There was talk of writing a simple ONCE() macro for this sort of thing:

	if (ONCE())
		printk(...)

but it never happened.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ