mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jonathan Lundell <linux@lundell-bros.com>
To: linux-kernel@vger.kernel.org
Subject: Re: ISA vs PCI interrupt handling
Date: Thu, 3 Apr 2003 11:42:56 -0800	[thread overview]
Message-ID: <p05210605bab23f34f677@[10.2.0.101]> (raw)

At 1:20am +0200 4/3/03, Krzysztof Halasa wrote:
>I mean, in situation where the handler terminates with the IRQ line
>being still active, will the handler be called again, or will the
>driver deadlock? Does is behave differently on ISA and PCI?
>...
>My experiments with ISA devices show that after the handler terminates
>without i.e. handling all requests, the IRQ line is stuck at +5V
>(= logical "active" level) and the handler isn't called anymore.
>
>Or does that mean the IRQ is edge-triggered, and the handler is being
>called just once a low-to-high edge is detected?

The "legacy" ISA interrupt controller has various modes, but the 
legacy mode is to be edge-sensitive. Edge-sensitivity here isn't 
quite what a hardware engineer would mean by it, but it does mean 
that, once an interrupt has been triggered, it has to go low before 
another interrupt can be recognized. That's consistent with your 
experiments. In general, an ISA interrupt service loop needs to be of 
the form: while (device is interrupting) { service the interrupt }

Shared interrupts (eg PCI) are different, of course. Because they're 
shared, the interrupt controller can't be edge-sensitive. One problem 
would be that another (interrupt sharing) device can hold the 
interrupt line active (low for PCI), so two devices could in 
principle interrupt alternately and the interrupt line itself never 
go inactive, and no edges would be seen by the interrupt controller.

The same service loop should work just fine, but the penalty for not 
servicing a PCI interrupt should just be that the ISR will get 
invoked again. Of course, that will go on forever unless the 
interrupt *is* serviced, but you can get away with servicing one at a 
time, and taking an interrupt for each event. Not necessarily 
efficient, but it should work.

Depending on the interrupt controller, an interrupt may need to be 
ACKed; this is definitely true for legacy ISA interrupt controllers. 
That's not typically a driver function, as I recall.
-- 
/Jonathan Lundell.

             reply	other threads:[~2003-04-03 19:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-03 19:42 Jonathan Lundell [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-04-02 23:20 Krzysztof Halasa
2003-04-03 10:43 ` Alan Cox
2003-04-03 19:17   ` Krzysztof Halasa

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='p05210605bab23f34f677@[10.2.0.101]' \
    --to=linux@lundell-bros.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®