Re: [patch] i386: halt the CPU on serious errors

From: Arjan van de Ven
Date: Wed Jun 21 2006 - 05:25:09 EST


On Tue, 2006-06-20 at 00:55 -0400, Chuck Ebbert wrote:
> Halt the CPU when serious errors are encountered and we
> deliberately go into an infinite loop.
>
> Suggested by Andreas Mohr.
>
> Signed-off-by: Chuck Ebbert <76306.1226@xxxxxxxxxxxxxx>
>
> --- 2.6.17-32.orig/arch/i386/kernel/crash.c
> +++ 2.6.17-32/arch/i386/kernel/crash.c
> @@ -113,8 +113,8 @@ static int crash_nmi_callback(struct pt_
> disable_local_APIC();
> atomic_dec(&waiting_for_crash_ipi);
> /* Assume hlt works */
> - halt();
> - for(;;);
> + for (;;)
> + halt();

if halt is fall through (as you suggest).. this would want a cpu_relax()
as well..

-
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/