is there any more to having a single interrupt drive multiple handlers than IRQF_SHARED?

Max Filippov jcmvbkbc at gmail.com
Thu Oct 26 17:52:39 EDT 2017


On Thu, Oct 26, 2017 at 2:17 PM,  <valdis.kletnieks at vt.edu> wrote:
> On Thu, 26 Oct 2017 16:32:42 -0400, "Robert P. J. Day" said:
>
>>   now, i do realize that it can be used along with a unique dev_id
>> values to isolate a *particular* handler amongst a group of handlers,
>> but if one simply wants to trigger *all* handlers registered for that
>> interrupt, is there anything about that that's tricky?
>
> You mean, other than the fact that multiple handlers for the same device
> damned well be coded to know that, and be aware of each other?

They don't have to be aware of each other, only about the fact that their
IRQ may be shared. And they have to be aware of that because they've
registered their ISR with IRQF_SHARED flag.

>  Locking, etc.
> and all the other Bad Juju that can happen when multiple drivers are all
> acting on one device.

Not on one device, each handler will check registers of its own device,
to see if it triggered the IRQ.

-- 
Thanks.
-- Max



More information about the Kernelnewbies mailing list