mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Gerard Roudier <groudier@club-internet.fr>
To: "Richard B. Johnson" <root@chaos.analogic.com>
Cc: David Schleef <ds@stm.lbl.gov>, Paul Ashton <lk@mailandnews.com>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	linux-kernel@vger.rutgers.edu
Subject: Re: Shared interrupt (lack of) handling
Date: Fri, 3 Sep 1999 20:19:49 +0200 (MET DST)	[thread overview]
Message-ID: <Pine.LNX.3.95.990903194822.369A-100000@localhost> (raw)
In-Reply-To: <Pine.LNX.3.95.990903074606.1016A-100000@chaos.analogic.com>



On Fri, 3 Sep 1999, Richard B. Johnson wrote:

> On Thu, 2 Sep 1999, Gerard Roudier wrote:
> [SNIPPED]
> 
> > 
> > In PCI, INTERRUPT ARE NOT SYNCHRONISATION EVENTS!  Synchronisation
> > events are PCI TRANSACTIONS in the context of ordering rules defined by
> > the specs,....
> 
> This sounds like something written by a lawyer. In plan language, any

The specifications _are_ the laws conformant hardwares and softwares shall
follow, and nothing else. People that use them as toilet paper are not
doing the right thing, in my opinion. ;-) 

> hardware interrupt is a hardware request for some software to do
> something. The interrupt event, itself, does not convey any
> knowledge about the reason why the interrupt occurred. Software has
> to inspect the hardware to determine the reason for the interrupt.

The piece of software that inspects the device status registers (or
memory) that tell about things to do must not care about the reason for
which it has been called, and must do proper things to synchronyze
correctly with the device, since INTERRUPTS ARE NOT SYNCHRONISATIONS
EVENTS in PCI.

> With shared interrupts, it is mandatory that the software that handles
> an interrupt event (the ISR), not complain if it finds that it got
> control and, upon inspecting the hardware, finds there is nothing to
> do.

NOT A SYNCHRONISATION EVENT as I wrote.

> How the PCI controller, raises the maskable interrupt pin on the
> CPU make no difference at all. One doesn't care if it's a 'PCI
> TRANSACTION' or a 'PYROSYNCHROGEM'. If it happened fast enough so
> the event isn't stale, nobody cares --and if the software cares,
> it's broken.

Donnot know what a PYROSYNCHROGEM is, but the prefix PYRO may let think
you wanted to flame somebody. ;-)

Indeed a software based in "fast enough" sorts of considerations is way
broken and is just race-based. It must base its behaviour on ordering
rules.

The order in which the PCI controller deals with data and raises the
interrupt, and the way both the PCI device and the C code access shared
memory or IO registers makes a GREAT difference, especially when posted
transactions are used. 

Obviously, the PCI device must make available the data to the CPU prior
to raising the interrupt. But both the PCI device and the C code must
behave correctly in order not to stall and not to see inconsistent data. 

Gérard.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

      reply	other threads:[~1999-09-03 18:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <19990902104044.A31769@stm.lbl.gov>
     [not found] ` <Pine.LNX.3.95.990902205502.393A-100000@localhost>
1999-09-02 21:42   ` David Schleef
1999-09-03 12:02   ` Richard B. Johnson
1999-09-03 18:19     ` Gerard Roudier [this message]

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=Pine.LNX.3.95.990903194822.369A-100000@localhost \
    --to=groudier@club-internet.fr \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=ds@stm.lbl.gov \
    --cc=linux-kernel@vger.rutgers.edu \
    --cc=lk@mailandnews.com \
    --cc=root@chaos.analogic.com \
    /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®