linux/kernel/irq
Marc Zyngier 4c457e8cb7 genirq/msi: Activate Multi-MSI early when MSI_FLAG_ACTIVATE_EARLY is set
When MSI_FLAG_ACTIVATE_EARLY is set (which is the case for PCI),
__msi_domain_alloc_irqs() performs the activation of the interrupt (which
in the case of PCI results in the endpoint being programmed) as soon as the
interrupt is allocated.

But it appears that this is only done for the first vector, introducing an
inconsistent behaviour for PCI Multi-MSI.

Fix it by iterating over the number of vectors allocated to each MSI
descriptor. This is easily achieved by introducing a new
"for_each_msi_vector" iterator, together with a tiny bit of refactoring.

Fixes: f3b0946d62 ("genirq/msi: Make sure PCI MSIs are activated early")
Reported-by: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20210123122759.1781359-1-maz@kernel.org
2021-01-30 01:22:31 +01:00
..
affinity.c
autoprobe.c
chip.c irqchip updates for Linux 5.11 2020-12-15 10:48:07 +01:00
cpuhotplug.c
debug.h
debugfs.c Merge branch 'irq/qcom-pdc-wakeup' into irq/irqchip-next 2020-10-06 11:28:03 +01:00
devres.c
dummychip.c
generic-chip.c genirq: Fix kernel-doc markups 2020-11-16 15:20:54 +01:00
handle.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
internals.h genirq/chip: Use the first chip in irq_chip_compose_msi_msg() 2020-09-16 16:52:28 +02:00
ipi.c
irq_sim.c genirq/irq_sim: Simplify the API 2020-05-18 10:30:21 +01:00
irqdesc.c genirq: Fix export of irq_to_desc() for powerpc KVM 2020-12-25 11:02:39 -08:00
irqdomain.c Generic interrupt and irqchips subsystem: 2020-12-15 15:03:31 -08:00
Kconfig irqchip updates for Linux 5.11 2020-12-15 10:48:07 +01:00
Makefile
manage.c genirq: Export irq_check_status_bit() 2021-01-13 15:48:05 +01:00
matrix.c genirq/matrix: Deal with the sillyness of for_each_cpu() on UP 2020-08-30 19:17:28 +02:00
migration.c
msi.c genirq/msi: Activate Multi-MSI early when MSI_FLAG_ACTIVATE_EARLY is set 2021-01-30 01:22:31 +01:00
pm.c genirq/PM: Introduce IRQCHIP_ENABLE_WAKEUP_ON_SUSPEND flag 2020-10-06 11:23:41 +01:00
proc.c genirq: Annotate irq stats data races 2020-12-15 16:19:30 +01:00
resend.c genirq: Walk the irq_data hierarchy when resending an interrupt 2020-09-06 18:25:23 +01:00
settings.h genirq: Allow interrupts to be excluded from /proc/interrupts 2020-09-13 17:04:38 +01:00
spurious.c
timings.c kernel/: fix repeated words in comments 2020-10-16 11:11:19 -07:00