From: Robert Love <rml@tech9.net>
To: jt@hpl.hp.com
Cc: Linux kernel mailing list <linux-kernel@vger.kernel.org>,
Jeff Garzik <jgarzik@mandrakesoft.com>,
Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: Re: Irq handler reentrancy ?
Date: 04 Sep 2002 18:29:28 -0400 [thread overview]
Message-ID: <1031178569.24333.3685.camel@phantasy> (raw)
In-Reply-To: <20020904221853.GB21494@bougret.hpl.hp.com>
[-- Attachment #1: Type: text/plain, Size: 276 bytes --]
On Wed, 2002-09-04 at 18:18, Jean Tourrilhes wrote:
> Just a quick question : can an interrupt handler be preempted
> or reenter itself ?
It is not supposed to.
There is a bug in 2.5, with a fix from Linus currently in bitkeeper. I
have attached the patch.
Robert Love
[-- Attachment #2: cset-1.611.txt --]
[-- Type: text/plain, Size: 1576 bytes --]
# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
# ChangeSet 1.610 -> 1.611
# arch/i386/kernel/irq.c 1.17 -> 1.18
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 02/09/04 torvalds@home.transmeta.com 1.611
# Fix IO-APIC edge IRQ handling. IRQ_INPROGRESS was cleared spuriously
# if a new edge happened while we were still processing the previous
# one.
#
# Then, if a _third_ edge came in, it would actually cause a reentrant
# irq handler invocation, because the original INPROGRESS bit was now
# lost.
#
# This was actually seen on IDE in PIO mode.
# --------------------------------------------
#
diff -Nru a/arch/i386/kernel/irq.c b/arch/i386/kernel/irq.c
--- a/arch/i386/kernel/irq.c Wed Sep 4 12:00:11 2002
+++ b/arch/i386/kernel/irq.c Wed Sep 4 12:00:11 2002
@@ -380,8 +380,9 @@
break;
desc->status &= ~IRQ_PENDING;
}
-out:
desc->status &= ~IRQ_INPROGRESS;
+
+out:
/*
* The ->end() handler has to deal with interrupts which got
* disabled while the handler was running.
@@ -768,7 +769,7 @@
if (!shared) {
desc->depth = 0;
- desc->status &= ~(IRQ_DISABLED | IRQ_AUTODETECT | IRQ_WAITING);
+ desc->status &= ~(IRQ_DISABLED | IRQ_AUTODETECT | IRQ_WAITING | IRQ_INPROGRESS);
desc->handler->startup(irq);
}
spin_unlock_irqrestore(&desc->lock,flags);
next prev parent reply other threads:[~2002-09-04 22:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-04 22:18 Jean Tourrilhes
2002-09-04 22:29 ` Robert Love [this message]
2002-09-04 22:32 ` Jean Tourrilhes
2002-09-04 23:55 ` Jean Tourrilhes
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=1031178569.24333.3685.camel@phantasy \
--to=rml@tech9.net \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=jgarzik@mandrakesoft.com \
--cc=jt@hpl.hp.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®