Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 May 2000 16:53:50 -0700
From:      Mike Smith <msmith@freebsd.org>
To:        Warner Losh <imp@village.org>
Cc:        Alexander Langer <alex@big.endian.de>, doc@FreeBSD.ORG, hackers@FreeBSD.ORG
Subject:   Re: request for review: bus_alloc_resource(9) 
Message-ID:  <200005182353.QAA05644@mass.cdrom.com>
In-Reply-To: Your message of "Thu, 18 May 2000 17:32:06 MDT." <200005182332.RAA97696@harmony.village.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> Second, RF_SHAREABLE should generally never be used.  There's one
> exception.  That's for interrupts that can be shared in the hardware.

Actually, this is almost exactly the wrong way up; RF_SHAREABLE should 
always be used unless you know that the interrupt _can't_ be shared.

In many cases, the driver can't tell whether it's allocating an interrupt 
which is or isn't shareable, and the only code that _can_ make this 
determination is in the parent layers.  ie. as this request propagates 
upwards, the parent bus(ses) code should remove the flag in cases where 
it's know the interrupt can't be shared.

> PCI bus is the only bus that does this reliably.  Since the PCCARD bus 
> can be bridged to the ISA bus or to PCI bus, you can't reliably share
> interrupts there.

... and this is why.  The pccard/cardbus bridge code, or the parent bus 
code, needs to decide whether the interrupt is or is not shareable - not 
the driver.

-- 
\\ Give a man a fish, and you feed him for a day. \\  Mike Smith
\\ Tell him he should learn how to fish himself,  \\  msmith@freebsd.org
\\ and he'll hate you for a lifetime.             \\  msmith@cdrom.com




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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200005182353.QAA05644>