mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 17:08:10 +00:00
bc976233a8
The new reservation mode for interrupts assigns a dummy vector when the
interrupt is allocated and assigns a real vector when the interrupt is
requested. The reservation mode prevents vector pressure when devices with
a large amount of queues/interrupts are initialized, but only a minimal
subset of those queues/interrupts is actually used.
This mode has an issue with MSI interrupts which cannot be masked. If the
driver is not careful or the hardware emits an interrupt before the device
irq is requestd by the driver then the interrupt ends up on the dummy
vector as a spurious interrupt which can cause malfunction of the device or
in the worst case a lockup of the machine.
Change the logic for the reservation mode so that the early activation of
MSI interrupts checks whether:
- the device is a PCI/MSI device
- the reservation mode of the underlying irqdomain is activated
- PCI/MSI masking is globally enabled
- the PCI/MSI device uses either MSI-X, which supports masking, or
MSI with the maskbit supported.
If one of those conditions is false, then clear the reservation mode flag
in the irq data of the interrupt and invoke irq_domain_activate_irq() with
the reserve argument cleared. In the x86 vector code, clear the can_reserve
flag in the vector allocation data so a subsequent free_irq() won't create
the same situation again. The interrupt stays assigned to a real vector
until pci_disable_msi() is invoked and all allocations are undone.
Fixes:
|
||
---|---|---|
.. | ||
affinity.c | ||
autoprobe.c | ||
chip.c | ||
cpuhotplug.c | ||
debug.h | ||
debugfs.c | ||
devres.c | ||
dummychip.c | ||
generic-chip.c | ||
handle.c | ||
internals.h | ||
ipi.c | ||
irq_sim.c | ||
irqdesc.c | ||
irqdomain.c | ||
Kconfig | ||
Makefile | ||
manage.c | ||
matrix.c | ||
migration.c | ||
msi.c | ||
pm.c | ||
proc.c | ||
resend.c | ||
settings.h | ||
spurious.c | ||
timings.c |