x86: hlt on early crash
authorIngo Molnar <mingo@elte.hu>
Wed, 30 Jan 2008 12:32:31 +0000 (13:32 +0100)
committerIngo Molnar <mingo@elte.hu>
Wed, 30 Jan 2008 12:32:31 +0000 (13:32 +0100)
H. Peter Anvin <hpa@zytor.com> wrote:

> It probably should actually HLT, to avoid sucking power, and stressing
> the thermal system.  We're dead at this point, and the early 486's
> which had problems with HLT will lock up - we don't care.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
arch/x86/boot/compressed/misc_32.c
arch/x86/boot/compressed/misc_64.c

index 288e16283ef960836af34c7273b2356cb1e1e1a9..9103652058c4f47fa76018a68f6561daea29d493 100644 (file)
@@ -339,7 +339,8 @@ static void error(char *x)
        putstr(x);
        putstr("\n\n -- System halted");
 
-       while(1);       /* Halt */
+       while (1)
+               asm("hlt");
 }
 
 asmlinkage void decompress_kernel(void *rmode, unsigned long end,
index 7d8338e21b007209ac44c2c6674da1dd5a74983a..8494f0dcff21c08e01cec62945ec0744634ec179 100644 (file)
@@ -338,7 +338,8 @@ static void error(char *x)
        putstr(x);
        putstr("\n\n -- System halted");
 
-       while(1);       /* Halt */
+       while (1)
+               asm("hlt");
 }
 
 asmlinkage void decompress_kernel(void *rmode, unsigned long heap,