From: "Michael Frank" <mhf@linuxmail.org>
To: "Chris Friesen" <cfriesen@nortelnetworks.com>,
"Grover, Andrew" <andrew.grover@intel.com>
Cc: "Helge Hafting" <helgehaf@aitel.hist.no>, linux-kernel@vger.kernel.org
Subject: Re: Why no interrupt priorities?
Date: Sat, 28 Feb 2004 03:11:18 +0800 [thread overview]
Message-ID: <opr31l84wi4evsfm@smtp.pacific.net.th> (raw)
In-Reply-To: <403F894C.1050808@nortelnetworks.com>
On Fri, 27 Feb 2004 13:15:40 -0500, Chris Friesen <cfriesen@nortelnetworks.com> wrote:
> Grover, Andrew wrote:
>
>> If a device later in the handler chain is also interrupting, then the
>> interrupt will immediately trigger again. The irq line will remain
>> asserted until nobody is asserting it.
>
> I thought I saw examples of edge-triggered shared interrupts earlier in
> the thread. Doesn't that give the reason for this behaviour?
To make it more clear
/---active--~--\
IRQa ---------/ \-------------------------
/-------------------------
IRQb ----------------------~--/
/----------~--\/\/-----------------------
IRQBUS ---------/
Program ....Main.....|.ISR...........|.Main............
Flow Edge trig Interrupt _dead_
Program ....Main.....|.ISR...........|.Main.|ISR.....
Flow Level trig
When IRQBUS is level triggered, ISR is reeentered fairly quickly
(within one instruction) after IRET (depends on CPU).
The only way to "fix" edge-trig shared IRQ's is to
a) perform blind extra poll of the _entire_ chain until _no_ devices
were serviced
b) Check IRQBUS and poll _entire_ chain when active.
And I find it mind boggling that IRQ's other than Timer and RTC are
edge triggered which also explains the troubles with sharing IRQ's.
It would be better to just program them level.
I good rule is:
An IRQ should be edge triggered when the ISR has no influence on the
state of the IRQ line. This is usually the case with periodic signals
such as timer outputs or strobes by rotary encoders and the like.
All other IRQs - in particular those "reset" by a software generated
events such as reading or writing a register - should be level triggered.
Regards
Michael
next prev parent reply other threads:[~2004-02-27 19:12 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-27 17:44 Grover, Andrew
2004-02-27 18:15 ` Chris Friesen
2004-02-27 18:42 ` Richard B. Johnson
2004-02-27 19:42 ` Michael Frank
2004-02-27 19:11 ` Michael Frank [this message]
2004-02-27 18:55 ` Matt Mackall
2004-02-27 19:09 ` Tim Hockin
2004-02-27 20:29 ` Matt Mackall
2004-02-27 19:19 ` Michael Frank
2004-02-27 20:53 ` Jesse Pollard
2004-02-29 9:43 ` Michael Frank
2004-03-01 16:57 ` Jesse Pollard
2004-03-01 17:35 ` Michael Frank
2004-03-02 15:25 ` Jesse Pollard
-- strict thread matches above, loose matches on Subject: below --
2004-02-27 11:37 Etienne Lorrain
2004-02-27 13:24 ` Michael Frank
[not found] <mailman.1077822002.21081.linux-kernel2news@redhat.com>
2004-02-27 8:00 ` Pete Zaitcev
2004-02-27 1:36 Grover, Andrew
2004-02-27 3:02 ` Randy.Dunlap
2004-02-29 8:32 ` Michael Frank
2004-02-29 8:36 ` Arjan van de Ven
2004-02-29 9:52 ` Michael Frank
2004-02-27 5:32 ` Benjamin Herrenschmidt
2004-02-27 6:26 ` Michael Frank
2004-02-27 6:46 ` Benjamin Herrenschmidt
2004-02-27 9:05 ` Russell King
2004-02-27 13:31 ` Michael Frank
2004-02-27 13:45 ` Richard B. Johnson
2004-02-27 13:50 ` Russell King
2004-02-27 14:51 ` Michael Frank
2004-02-27 7:25 ` Arjan van de Ven
2004-02-27 10:15 ` Helge Hafting
2004-02-27 18:32 ` Mike Fedyk
2004-02-26 23:47 Albert Cahalan
2004-02-26 19:05 Tim Bird
2004-02-26 19:39 ` Richard B. Johnson
2004-02-26 21:02 ` Tim Bird
2004-02-26 21:30 ` Arjan van de Ven
2004-02-26 22:21 ` Mark Gross
2004-02-27 7:14 ` Arjan van de Ven
2004-02-27 11:27 ` Ingo Oeser
2004-02-27 11:52 ` Arjan van de Ven
2004-02-27 13:23 ` Richard B. Johnson
2004-02-27 12:04 ` Christoph Hellwig
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=opr31l84wi4evsfm@smtp.pacific.net.th \
--to=mhf@linuxmail.org \
--cc=andrew.grover@intel.com \
--cc=cfriesen@nortelnetworks.com \
--cc=helgehaf@aitel.hist.no \
--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®