On Mon, 22 May 2006, Rogier Wolff wrote:
>
> The question I'm stuck with is: When is it valid to ask for a non-shared
> IRQ, and get back a shared one.
>
> Drivers that know that they don't work well if they are called by the
> "other" interrupt?
No.
For example, on certain 16-bit PCMCIA setups, the PCMCIA controller may
have just one interrupt. It may even have that interrupt exclusively, but
the point is, it has _one_. One interrupt shared for both doing not just
card interrupts, but also for PCMCIA CSC interrupts.
In that situation, once the card has been inserted (and powerup etc has
happened), the only interrupts you'll get is actually the interrupts for
the card. So everything is fine.
BUT A PCMCIA DRIVER STILL MUST NOT ASK FOR A NON-SHARED IRQ.
Because the irq will still be registered by the PCMCIA layer, and the
PCMCIA layer will check whether the interrupt was due to a CSC when the
card was removed, for example.
So there's basically never any valid reason to ask for a nonshared irq.
> I happen to know (ISA) hardware that CANNOT share an interrupt
Not necessarily true, since ISA cards have been known to be able to share
an interrupt with the proper pull-down resistors. It was even common for
serial cards.
Perhaps more importantly, not relevant for PCMCIA. There is no PCMCIA
hardware that cannot share an interrupt, for reasons outlines above.
There might be really bad hardware that doesn't even have an interrupt
status register so you can't tell if an interrupt happened from that card
or not, making it hard to write a driver that can handle "spurious"
interrupts (in the case of real sharing), but that sounds pretty damn
unlikely.
Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]