Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Dec 2001 03:02:19 -0800
From:      Terry Lambert <tlambert2@mindspring.com>
To:        Warner Losh <imp@harmony.village.org>
Cc:        Danny Braniss <danny@cs.huji.ac.il>, Bernd Walter <ticso@cicely8.cicely.de>, Mike Smith <msmith@FreeBSD.ORG>, freebsd-hackers@FreeBSD.ORG
Subject:   Re: irq
Message-ID:  <3C17393B.8297E824@mindspring.com>
References:  <3C1614D5.B5C3B4C5@mindspring.com>  <E16Dk3D-000AIb-00@pampa.cs.huji.ac.il> <200112120516.fBC5GJM33101@harmony.village.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Warner Losh wrote:
> In message <3C1614D5.B5C3B4C5@mindspring.com> Terry Lambert writes:
> : Some cards do not have a hardware "I caused an interrupt" register,
> : and use a differential (e.g. ring head vs. tail inequal after
> : interrupt) to tell if there is work to do.  If these cards were to
> : share interrupts, then they most likely do work every interrupt,
> : and less work per interrupt, then would otherwise be the case (i.e.
> : it would defeat hardware interrupt coelescing thresholds, among
> : other things).
> 
> No such PCI cards can exists.  The PCI spec requires that interrupt
> sharing work.

???

How is setting a local register when an interrupt is triggered
antithetical to such cards working?  I know of several network
cards where I've personally hacked on the driver that have such
a register.

It's not possbile to take a shared interrupt and not run the ISR,
but it's possible for the ISR to check the register and decide on
that basis, rather than on data availability, that it will or will
not do work.

I think that everyone now "gets" that PCI interrupts are like
signals, in that they are persistant conditions, so more than one
card asserting them doesn't change the fact that "an interrupt"
was asserted, and there's no way to tell _from the interrupt_
which cards did or did not assert it in the first place.  But we
are talking about an extra hardware register on the card that the
card sets when it asserts an interrupt, so an ISR can look to ask
the card "did you assert an interrupt?" and decide not to process
if the answer is "no".

The Tigon II interrupt sharing in fact depends on this, or when
you had two Tigon II cards, you migh spend the rest of eternity in
the ISR.

-- Terry

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3C17393B.8297E824>