Re: Shared Interrupts - PCI
Thu, 29 Jun 95 16:07:38 -0400

> Doing shared interrupts for PCI will probably work fine, because the PCI
> bus is designed to handle it. Unfortunately, for the ISA bus, life
> isn't so simple.

Then (at least for the first cut) we should implement an 'irqflags' bit
like Linus suggested that means shared/not shared (not shared = 0, i.e.
ISA default) that is tested by 'request_irq'. If an ISA card has
already requested the interrupt, sharing will not be allowed.
Similarly, if a PCI device has already requested the interrupt in
shared mode a subsequent request by an ISA device will not be honoured.
I believe all the cases are covered in the following karnaugh map:

\ 00 01 11 10
irqflags +---+---+---+---+
0| U | U | N | N |
1| S | S | S | N |

where handler is the first handler for this irq (0 means not present)
hflags is the associated 'shared' bit in the irqflags for this handler
irqflags is the new 'shared' bit for this new request.
'U' means non-shareable request accepted
'S' means shareable request accepted
'N' means not allowed (request will be denied)

This means we can keep both buses separate and no changes need be made
to the serial driver other than changes to the request/free_irq
parameters. The device driver writer can then decide whether shared
interrupts are to be used or not.

I shudder to think how this might play out in other (eg Alpha) hardware.