At Tue, 2 Jun 2015 12:10:34 +0100, Mark Brown wrote:
On Tue, Jun 02, 2015 at 12:48:50PM +0200, Takashi Iwai wrote:
Mark Brown wrote:
Why does the driver care though? IRQF_SHARED is advertising the capabilities of the hander, not a requirement on the hardware - if the interrupt physically can't be shared then the ability to share it will never get used but that shouldn't matter.
Because the kernel doesn't guarantee the exclusiveness of irq handler registration as long as you pass IRQF_SHARED. That is, if we keep IRQF_SHARED and another driver tries to request_irq() for the same irq with again IRQF_SHARED. But this shouldn't happen with MSI.
Sure, but how could that happen (given that the interrupt physically can't be shared) and surely individual client drivers are the wrong place to do this -
Oh how can you trust BIOS setup? :) A wrong numbered IRQ is a most frequently seen problem (mostly not about MSI, though).
it's not like MSI is the only interrupt type that has trouble with sharability, if this is an issue we need to have checks and enforcement for I'd expect the interrupt controller to be flagging itself as unsharable.
Rather the sharable interrupt is exceptional, I'd say. That's the reason we have IRQF_SHARED, not IRQF_EXCLUSIVE.
Takashi