From: Jun Sun <jsun@mvista.com>
To: Dominic Sweetman <dom@algor.co.uk>
Cc: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>,
Ralf Baechle <ralf@linux-mips.org>,
linux-mips@linux-mips.org, jsun@mvista.com
Subject: Re: [PATCH] add dispatch_i8259_irq() to i8259.c
Date: Tue, 17 Dec 2002 11:54:56 -0800 [thread overview]
Message-ID: <20021217115456.I11575@mvista.com> (raw)
In-Reply-To: <15871.13866.515311.16388@arsenal.algor.co.uk>; from dom@algor.co.uk on Tue, Dec 17, 2002 at 02:35:22PM +0000
On Tue, Dec 17, 2002 at 02:35:22PM +0000, Dominic Sweetman wrote:
>
> > The i8259A doesn't work this way. With your proposed code the IRR
> > is never cleared (which is a problem for edge-triggered interrupts
> > -- such an interrupt gets signalled again once it's unmasked, until
> > deasserted by a device). The i8259A only clears a bit in the IRR
> > when it receives an ACK (it then copies the bit to the corresponding
> > bit of the ISR) or when an interrupt goes away (a device deasserts
> > it).
>
> Just a few comments on the hardware:
>
> As I recall, you can clear a stored edge-triggered interrupt using a
> "specific EOI". In the 8080 microprocessor for which the 8259 was
> designed, this command was magically communicated to the 8259 when the
> CPU ran its "return from interrupt" instruction. I think even in the
> 8086 this had to be replaced with an explicit I/O cycle.
>
> People not using x86 CPUs should consider putting the i8259 into
> "special mask mode". Then it behaves simply and predictably,
> providing an interrupt on any active unmasked input. You lose the
> i8259 interrupt priority stuff, but this is only one of the
> advantages.
This sounds a lot like the doc I read when I did the programming. Does
anybody know *the doc* I am talking about? I can't seem to find it anymore.
Meanwhile I find myself cannot answer Maciej's question as to when IRR
bit is cleared under edge triggering case. Perhaps the hardware does it
automatically when IRQ is generated?
I will probe further and reply to you later.
Jun
next prev parent reply other threads:[~2002-12-17 19:55 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-13 23:08 [PATCH] add dispatch_i8259_irq() to i8259.c Jun Sun
2002-12-14 0:55 ` Maciej W. Rozycki
2002-12-14 4:18 ` Ralf Baechle
2002-12-16 13:44 ` Maciej W. Rozycki
2002-12-16 20:40 ` Jun Sun
2002-12-17 13:39 ` Maciej W. Rozycki
2002-12-17 14:35 ` Dominic Sweetman
2002-12-17 18:23 ` Ralf Baechle
2002-12-17 18:33 ` Maciej W. Rozycki
2002-12-17 18:27 ` Maciej W. Rozycki
2002-12-17 19:54 ` Jun Sun [this message]
2002-12-17 21:40 ` Jun Sun
2002-12-18 16:14 ` Maciej W. Rozycki
2002-12-18 17:48 ` Jun Sun
2002-12-18 18:14 ` Maciej W. Rozycki
2002-12-18 18:51 ` Jun Sun
2002-12-18 19:26 ` Maciej W. Rozycki
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=20021217115456.I11575@mvista.com \
--to=jsun@mvista.com \
--cc=dom@algor.co.uk \
--cc=linux-mips@linux-mips.org \
--cc=macro@ds2.pg.gda.pl \
--cc=ralf@linux-mips.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