From: Corey Minyard <minyard@acm.org>
To: linux-kernel@vger.kernel.org
Cc: John Levon <levon@movementarian.org>, dipankar@gamebox.net
Subject: [PATCH] NMI request/release, version 8
Date: Fri, 25 Oct 2002 08:26:27 -0500 [thread overview]
Message-ID: <3DB94683.8080902@acm.org> (raw)
In-Reply-To: 3DB8A5E3.5010505@mvista.com
[-- Attachment #1: Type: text/plain, Size: 285 bytes --]
I realized that the piece of code at the end of the old NMI handler was
still necessary. I have attached a patch to the previous version to fix
the problem. The full version of the patch with this fix is on my web
page at http://home.attbi.com/~minyard/linux-nmi-v8.diff.
-Corey
[-- Attachment #2: linux-nmi-v7-v8.diff --]
[-- Type: text/plain, Size: 1701 bytes --]
--- linux.v8/arch/i386/kernel/nmi.c Thu Oct 24 20:53:04 2002
+++ linux/arch/i386/kernel/nmi.c Fri Oct 25 08:21:22 2002
@@ -208,30 +208,29 @@
if (!handled)
unknown_nmi_error(regs, cpu);
-#if 0
- /*
- * It MAY be possible to only call handlers until one returns
- * that it handled the NMI, if, we do the following. Assuming
- * that all the incoming signals causing NMIs are
- * level-triggered, this code will cause another NMI
- * immediately if the incoming signal is still asserted. I
- * don't know if the assumption is correct or if it's better
- * to call all the handlers or do the I/O.
- *
- * I'm pretty sure that this won't work with the performance
- * registers NMI output, so I'm guessing that this won't work.
- */
else {
/*
* Reassert NMI in case it became active meanwhile
- * as it's edge-triggered.
+ * as it's edge-triggered. Don't do this if the NMI
+ * wasn't handled to avoid an infinite NMI loop.
+ *
+ * This is necessary in case we have another external
+ * NMI while processing this one. The external NMIs
+ * are level-generated, into the processor NMIs are
+ * edge-triggered, so if you have one NMI source
+ * come in while another is already there, the level
+ * will never go down to cause another edge, and
+ * no more NMIs will happen. This does NOT apply
+ * to internally generated NMIs, though, so you
+ * can't use the same trick to only call one handler
+ * at a time. Otherwise, if two internal NMIs came
+ * in at the same time you might miss one.
*/
outb(0x8f, 0x70);
inb(0x71); /* dummy */
outb(0x0f, 0x70);
inb(0x71); /* dummy */
}
-#endif
}
void __init init_nmi(void)
next prev parent reply other threads:[~2002-10-25 13:19 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-22 1:32 [PATCH] NMI request/release Corey Minyard
2002-10-22 2:10 ` John Levon
2002-10-22 2:32 ` Corey Minyard
2002-10-22 2:53 ` John Levon
2002-10-22 13:02 ` Corey Minyard
2002-10-22 15:09 ` John Levon
2002-10-22 16:03 ` Corey Minyard
2002-10-22 17:23 ` Robert Love
2002-10-22 18:08 ` Corey Minyard
2002-10-22 18:16 ` Robert Love
2002-10-22 20:04 ` Dipankar Sarma
2002-10-22 17:53 ` Dipankar Sarma
2002-10-22 18:05 ` Corey Minyard
2002-10-22 18:08 ` Dipankar Sarma
2002-10-22 18:29 ` Corey Minyard
2002-10-22 19:08 ` John Levon
2002-10-22 21:36 ` [PATCH] NMI request/release, version 3 Corey Minyard
2002-10-23 17:33 ` Dipankar Sarma
2002-10-23 18:03 ` Corey Minyard
2002-10-23 18:57 ` Dipankar Sarma
2002-10-23 20:14 ` [PATCH] NMI request/release, version 4 Corey Minyard
2002-10-23 20:50 ` Dipankar Sarma
2002-10-23 21:53 ` Corey Minyard
2002-10-24 7:41 ` Dipankar Sarma
2002-10-24 13:08 ` Corey Minyard
2002-10-24 7:50 ` Dipankar Sarma
2002-10-24 13:05 ` Corey Minyard
2002-10-24 13:28 ` [PATCH] NMI request/release, version 5 - I think this one's ready Corey Minyard
2002-10-24 14:46 ` John Levon
2002-10-24 15:36 ` Corey Minyard
2002-10-24 17:18 ` John Levon
2002-10-24 17:43 ` Corey Minyard
2002-10-24 18:04 ` John Levon
2002-10-24 18:32 ` Corey Minyard
2002-10-24 18:47 ` John Levon
2002-10-24 20:03 ` Corey Minyard
2002-10-24 20:29 ` John Levon
2002-10-25 1:22 ` [PATCH] NMI request/release, version 6 - "Well I thought the last one was ready" Corey Minyard
2002-10-25 1:39 ` John Levon
2002-10-25 1:58 ` Jeff Garzik
2002-10-25 2:01 ` [PATCH] NMI request/release, version 7 - minor cleanups Corey Minyard
2002-10-25 13:26 ` Corey Minyard [this message]
2002-10-22 12:23 ` [PATCH] NMI request/release Suparna Bhattacharya
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=3DB94683.8080902@acm.org \
--to=minyard@acm.org \
--cc=dipankar@gamebox.net \
--cc=levon@movementarian.org \
--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;
as well as URLs for NNTP newsgroup(s).