Skip to contentSkip to conversation

i386: halt the CPU on serious errors

PATCH Chuck Ebbert 1 participant 1 message Jun 21, 2006

lore
Share & tools
lore
#0 lore raw

In-Reply-To: <[email protected]>

Quoted 11 lines · Dave Jones
Quoted 11 lines
arch/i386/kernel/crash.c +2 -2
@@ -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();
 
Quoted 3 lines

arch/i386/kernel/crash.c static int crash_nmi_callback(struct pt_ · line 119

Quoted 1 line
arch/i386/kernel/crash.c +0 -0
    return 1;

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

Yeah, but why not do it anyway? I'll change the comment.

Quoted 6 lines
Quoted 6 lines
arch/i386/kernel/doublefault.c +0 -0
@@ -44,7 +44,8 @@ static void doublefault_fn(void)
            }
    }
 
Quoted 6 lines

arch/i386/kernel/doublefault.c static void doublefault_fn(void) · line 49

Quoted 4 lines
arch/i386/kernel/doublefault.c +2 -1
-   for (;;) /* nothing */;
+   for (;;)
+           halt();
 }

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

OK.

Signature · 2 lines
Chuck
 "You can't read a newspaper if you can't read."  --George W. Bush