AbhinavChoudhury
AbhinavChoudhury

Reputation: 1187

Shared IRQs in Linux

When an IRQ line is shared between multiple registered interrupt service routines, what determines the order of execution of the ISRs when the interrupt line is raised?

Upvotes: 0

Views: 758

Answers (1)

Alexey Polonsky
Alexey Polonsky

Reputation: 1201

The order is not predictable anyway because, as you said, the interrupt line is shared. So there are (or might be) other device drivers in the system that register an ISR on same interrupt line shared with your ISR. So you cannot assume in which order the ISRs are invoked !

Now when interrupt line is raised, the kernel invokes all ISRs that are registered for that that line, one-by-one, untill a certain ISR returns "CLAIMED".

The ISR gets a soft context that represents the device and it is up to ISR to check that this device is the source of interrupt. If yes, the ISR returns CLAIMED, otherwise NOT CLAIMED.

Upvotes: 1

Related Questions