Page 1 of 1

Shared IRQ lines

Posted: Wed Jan 19, 2005 8:16 am
by gaf
Hello,
is there any way of telling which device caused an shared IRQ or does this have to be determined by the drivers themselves ?

regards,
gaf

Re:Shared IRQ lines

Posted: Wed Jan 19, 2005 8:53 am
by distantvoices
I think this has to be determined by the drivers. There are some flags/functions in the pci config space which can be used to determine inside the interrupt handler: Have you triggered this irq? if no? next interrupt handler please. Untl, if no handler feels responsible, a global handler is called to report about the facht that some hardware has demanded attention.

In short, you build a linked list of handlers and have one after the other check the device - if it is responsible for the device, it should take the needed operations.

hm. Me is still at research concerning chained interrupt handlers and shared irq lines. so thats ust my rambling.

Re:Shared IRQ lines

Posted: Thu Jan 20, 2005 10:50 am
by gaf
Thanks for your help, beyond infinity. I think that it's a pretty bad hardware design if there's no standard way of detecting which device caused an IRQ, but that's just one of the idiocies of the x86 and I can't change it...
In short, you build a linked list of handlers and have one after the other check the device - if it is responsible for the device, it should take the needed operations.
I'd use a tree :). That way it's easier to keep track of the access rights: only an app/driver that already owns an IRQ can give it to (or share it with) another task.

regards,
gaf