Re: is there any more to having a single interrupt drive multiple handlers than IRQF_SHARED?
On Thu, Oct 26, 2017 at 2:17 PM,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 ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: is there any more to having a single interrupt drive multiple handlers than IRQF_SHARED?
On Thu, 26 Oct 2017, valdis.kletni...@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? Locking, etc. and all the other Bad Juju that can happen > when multiple drivers are all acting on one device. > > What problem is your colleague trying to solve by doing this? i wish i had more info, but i don't ... all i'm after is that this is supportable via IRQF_SHARED and, when we chat again tomorrow, i might be able to figure out whether this is appropriate. having the handlers play nicely together will be phase two. rday p.s. is there an example of this usage somewhere in the kernel i can point at? i vaguely recall that PCI does something like this, so i'm off to take a look. -- Robert P. J. Day Ottawa, Ontario, CANADA http://crashcourse.ca Twitter: http://twitter.com/rpjday LinkedIn: http://ca.linkedin.com/in/rpjday ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: is there any more to having a single interrupt drive multiple handlers than IRQF_SHARED?
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? Locking, etc. and all the other Bad Juju that can happen when multiple drivers are all acting on one device. What problem is your colleague trying to solve by doing this? pgplnzH6vIgD8.pgp Description: PGP signature ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies