mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bjorn Helgaas <bjorn.helgaas@hp.com>
To: Thomas Renninger <trenn@suse.de>
Cc: linux-kernel@vger.kernel.org, ak@linux.intel.com,
	len.brown@intel.com, arjan@linux.intel.com,
	linux-acpi@vger.kernel.org,
	Christian Kornacker <ckornacker@suse.de>
Subject: Re: [PATCH 1/3] Introduce interface to report BIOS bugs
Date: Thu, 21 Aug 2008 09:19:07 -0600	[thread overview]
Message-ID: <200808210919.07642.bjorn.helgaas@hp.com> (raw)
In-Reply-To: <200808211552.06054.trenn@suse.de>

On Thursday 21 August 2008 07:52:04 am Thomas Renninger wrote:
> On Wednesday 20 August 2008 20:37:42 Bjorn Helgaas wrote:

> > Maybe even something as simple as:
> >
> >     #define FW_BUG	"[FW bug]: "
> >
> > would be sufficient, with the idea that people could do this:
> >
> >     dev_err(&dev->dev, FW_BUG "interrupts left enabled\n");
> >
> > I think the user-space value derives from having a consistent string
> > to grep for, so this gives you that.  I'm not sure what value we get
> > from adding the new FW_PRINT_CRIT()/FW_PRINT_WARN() interfaces in the
> > kernel.
> 
> What about this one:
> pr_fw_err() or dev_fw_err() on harmful firmware bugs
> and
> pr_fw_info() on non-harmful but ugly BIOS constructs
> which should not exist, violate the spec or could make
> trouble in the future (maybe Firmware is really better...):
> 
> diff --git a/include/linux/device.h b/include/linux/device.h
> index d24a47f..3204cea 100644
> --- a/include/linux/device.h
> +++ b/include/linux/device.h
> @@ -538,6 +538,9 @@ extern const char *dev_driver_string(struct device *dev);
>  #define dev_info(dev, format, arg...)		\
>  	dev_printk(KERN_INFO , dev , format , ## arg)
>  
> +#define dev_fw_err(dev, format, arg...)		\
> +	dev_printk(KERN_ERR "[BIOS Bug] ", dev , format , ## arg)
> +
>  #ifdef DEBUG
>  #define dev_dbg(dev, format, arg...)		\
>  	dev_printk(KERN_DEBUG , dev , format , ## arg)
> diff --git a/include/linux/kernel.h b/include/linux/kernel.h
> index 2651f80..b20f618 100644
> --- a/include/linux/kernel.h
> +++ b/include/linux/kernel.h
> @@ -303,6 +303,12 @@ static inline char *pack_hex_byte(char *buf, u8 byte)
>  #define pr_info(fmt, arg...) \
>  	printk(KERN_INFO fmt, ##arg)
>  
> +#define pr_fw_err(fmt, arg...) \
> +	printk(KERN_ERR "[BIOS Bug]" fmt, ##arg)
> +
> +#define pr_fw_info(fmt, arg...) \
> +	printk(KERN_INFO "[BIOS]" fmt, ##arg)
> +
>  #ifdef DEBUG
>  /* If you are writing a driver, please use dev_dbg instead */
>  #define pr_debug(fmt, arg...) \

What value do we gain by defining dev_fw_err(), pr_fw_err(), and
pr_fw_info(), versus just defining FW_BUG?  If they're useful
for something, fine; it's just that I don't know yet what they add.

Bjorn

  reply	other threads:[~2008-08-21 15:19 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-20 17:02 [RFC] " Thomas Renninger
2008-08-20 17:02 ` [PATCH 1/3] " Thomas Renninger
2008-08-20 17:37   ` Andi Kleen
2008-08-20 18:37   ` Bjorn Helgaas
2008-08-21 13:52     ` Thomas Renninger
2008-08-21 15:19       ` Bjorn Helgaas [this message]
2008-08-27 13:27         ` Introduce interface to report BIOS bugs (reworked, FW_BUG simple solution) Thomas Renninger
2008-08-27 13:34           ` Thomas Renninger
2008-08-27 15:19           ` Andi Kleen
2008-08-30 13:15           ` Pavel Machek
2008-08-27 13:27         ` [PATCH 1/3] Introduce FW_BUG and FW_INFO to consistenly tell users about BIOS bugs Thomas Renninger
2008-08-27 13:27         ` [PATCH 2/3] CPUFREQ: powernow-k8: Try to detect old BIOS, not supporting CPU freq on a recent AMD CPUs Thomas Renninger
2008-08-27 13:27         ` [PATCH 3/3] CPUFREQ: processor.ko: Try to detect old BIOS, not supporting CPU freq on a recent CPU Thomas Renninger
2008-08-22 10:19   ` [PATCH 1/3] Introduce interface to report BIOS bugs Pavel Machek
2008-08-20 17:02 ` [PATCH 2/3] Powernow-k8: Make use of firmware bug report interface Thomas Renninger
2008-08-22 10:19   ` Pavel Machek
2008-08-20 17:02 ` [PATCH 3/3] acpi-cpufreq: " Thomas Renninger

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=200808210919.07642.bjorn.helgaas@hp.com \
    --to=bjorn.helgaas@hp.com \
    --cc=ak@linux.intel.com \
    --cc=arjan@linux.intel.com \
    --cc=ckornacker@suse.de \
    --cc=len.brown@intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --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

all inboxes | Powered by JetHome®