lkml.org 
[lkml]   [2006]   [Jun]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] i386: halt the CPU on serious errors
On Tue, Jun 20, 2006 at 12:55:25AM -0400, Chuck Ebbert wrote:

> --- 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();
>
> return 1;

But we should never get past that first halt(), as interrupts are disabled.

> --- 2.6.17-32.orig/arch/i386/kernel/doublefault.c
> +++ 2.6.17-32/arch/i386/kernel/doublefault.c
> @@ -44,7 +44,8 @@ static void doublefault_fn(void)
> }
> }
>
> - for (;;) /* nothing */;
> + for (;;)
> + halt();
> }

This one would probably be better off as a cpu_relax()

Dave

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

\
 
 \ /
  Last update: 2006-06-20 07:12    [W:0.062 / U:0.644 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site