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

From: Jesper Juhl
Date: Fri Oct 21 2005 - 08:06:22 EST


On 10/21/05, Alan Cox <alan@xxxxxxxxxxxxxxxxxxx> 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@xxxxxxxxx>
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/