mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [patch] i386: cpu_relax() in crash.c and doublefault.c
@ 2006-06-23  7:40 Chuck Ebbert
  2006-06-23  8:30 ` Andreas Mohr
  2006-06-28 19:04 ` Pavel Machek
  0 siblings, 2 replies; 6+ messages in thread
From: Chuck Ebbert @ 2006-06-23  7:40 UTC (permalink / raw)
  To: linux-kernel; +Cc: Andrew Morton, Andreas Mohr, Dave Jones

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>

--- 2.6.17-32.orig/arch/i386/kernel/crash.c
+++ 2.6.17-32/arch/i386/kernel/crash.c
@@ -114,7 +114,8 @@ static int crash_nmi_callback(struct pt_
 	atomic_dec(&waiting_for_crash_ipi);
 	/* Assume hlt works */
 	halt();
-	for(;;);
+	for (;;)
+		cpu_relax();
 
 	return 1;
 }
--- 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 (;;)
+		cpu_relax();
 }
 
 struct tss_struct doublefault_tss __cacheline_aligned = {
-- 
Chuck
 "You can't read a newspaper if you can't read."  --George W. Bush

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-06-28 19:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-23  7:40 [patch] i386: cpu_relax() in crash.c and doublefault.c Chuck Ebbert
2006-06-23  8:30 ` Andreas Mohr
2006-06-23 11:44   ` linux-os (Dick Johnson)
2006-06-28 19:06   ` Pavel Machek
2006-06-28 19:09   ` Pavel Machek
2006-06-28 19:04 ` Pavel Machek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®