Old INTx interrupts have two problematic properties:
- Each INTx signal requires a separate signal line in the equipment; and
- the interrupt signal is independent of other data signals, and it is sent asynchronously.
The consequences are that
- several devices and drivers should be able to share interrupts (the interrupt handler should check if its device actually caused an interrupt); and
- when a driver receives an interrupt, it needs to read some device register to ensure that any previous DMA entries made by the device will be visible on the CPU.
Typically, both cases are handled by a driver reading its device interrupt status register.
Signal interrupts do not require a separate signal line, but are sent as a message on the data bus. This means that the same hardware can support many more interrupts (so you do not need to use it), and that the interrupt message is automatically synchronized with any DMA accesses. As a result, the interrupt handler does not have to do anything; an interrupt is guaranteed to come from his device, and DMA'd data is guaranteed to have already arrived.
If some drivers were written to be shared by some MSIs, the interrupt handler would again need to check whether the interrupt actually occurred from its own device, and there would be no advantage over INTx interrupts.
MSIs are not shared because it would be impossible, but because it is not necessary.
Note that MSI sharing is actually possible: as shown in this excerpt from /proc/interrupts , extended error messages, power management events, and hotplugging drivers use one interrupt:
64: 0 0 PCI-MSI-edge aerdrv, PCIe PME, pciehp
These drivers are actually tied to the same device, but they still behave similarly to INTx drivers, i.e. register an interrupt with IRQF_SHARED , and interrupt handlers check if it was their own function that caused the interrupt.
source share