[PATCH] i386: cpu_relax() in crash.c and doublefault.c
authorChuck Ebbert <76306.1226@compuserve.com>
Sun, 25 Jun 2006 12:46:53 +0000 (05:46 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Sun, 25 Jun 2006 17:00:55 +0000 (10:00 -0700)
Add cpu_relax() to infinite loops in crash.c and doublefault.c.  This is
the safest change.

Signed-off-by: Chuck Ebbert <76306.1226@compuserve.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/i386/kernel/crash.c
arch/i386/kernel/doublefault.c

index 2b0cfce..21dc1bb 100644 (file)
@@ -114,7 +114,8 @@ static int crash_nmi_callback(struct pt_regs *regs, int cpu)
        atomic_dec(&waiting_for_crash_ipi);
        /* Assume hlt works */
        halt();
-       for(;;);
+       for (;;)
+               cpu_relax();
 
        return 1;
 }
index 5edb1d3..b4d14c2 100644 (file)
@@ -44,7 +44,8 @@ static void doublefault_fn(void)
                }
        }
 
-       for (;;) /* nothing */;
+       for (;;)
+               cpu_relax();
 }
 
 struct tss_struct doublefault_tss __cacheline_aligned = {