From: Chuck Ebbert <76306.1226@compuserve.com>
To: linux-kernel <linux-kernel@vger.kernel.org>
Cc: Andrew Morton <akpm@osdl.org>,
Andreas Mohr <andi@rhlx01.fht-esslingen.de>,
Dave Jones <davej@redhat.com>
Subject: [patch] i386: cpu_relax() in crash.c and doublefault.c
Date: Fri, 23 Jun 2006 03:40:25 -0400 [thread overview]
Message-ID: <200606230343_MC3-1-C33B-67CA@compuserve.com> (raw)
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
next reply other threads:[~2006-06-23 7:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-23 7:40 Chuck Ebbert [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200606230343_MC3-1-C33B-67CA@compuserve.com \
--to=76306.1226@compuserve.com \
--cc=akpm@osdl.org \
--cc=andi@rhlx01.fht-esslingen.de \
--cc=davej@redhat.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®