Re: PATCH: Allow users to force a panic on NMI

Jesper Juhl
2005-10-21T13:06:15Z

On 10/21/05, Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
> The default Linux behaviour on an NMI of either memory or unknown is to
> continue operation. For many environments such as scientific computing
> it is preferable that the box is taken out and the error dealt with than
> an uncorrected parity/ECC error get propogated.
>
[snip]
> {
> printk("Uhhuh. NMI received. Dazed and confused, but trying to continue\n");
> printk("You probably have a hardware problem with your RAM chips\n");
> +
> + if(panic_on_unrecovered_nmi)
> + panic("NMI: Not continuing");
>

How about something like this instead?

printk(KERN_WARNING "Uhhuh. NMI received. Dazed and confused\n");
printk(KERN_WARNING "You probably have a hardware problem with your
RAM chips\n");

if (panic_on_unrecovered_nmi)
panic("NMI: panic_on_unrecovered_nmi enabled - Not continuing");
else
printk(KERN_WARNING "NMI: panic_on_unrecovered_nmi disabled -
continuing\n");

First of all then it won't start out by saying that it's going to
continue, only to panic a few lines down.
Secondly it shows clearly to anyone reading the messages that there's
a control available for changing the behaviour, and that person can
then go look up how that's done.

Just a suggestion...

--
Jesper Juhl <jesper.juhl@gmail.com>
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please http://www.expita.com/nomime.html