]> www.infradead.org Git - users/jedix/linux-maple.git/commit
MSI: Don't assign MSI IRQ vector twice v4.1.12-106.0.20170720_1900
authorAshok Vairavan <ashok.vairavan@oracle.com>
Sun, 16 Jul 2017 21:24:21 +0000 (14:24 -0700)
committerAshok Vairavan <ashok.vairavan@oracle.com>
Thu, 20 Jul 2017 18:33:36 +0000 (11:33 -0700)
commit5c76f003e411f87a5581380f5cfaaeb1378a8de1
treeb6b8230e97bd183d8010c03311bb6ee9bd96e5c2
parenta076ce5fd490b86e9043f10ec16273a2e60f81aa
MSI: Don't assign MSI IRQ vector twice

Orabug: 26275961

NVMe enables MSIx interrupts during the nvme device probe
and also during nvme reset. While enabling MSIx interrupts
using do_setup_msix_irqs(), it does it twice. It assigns
the IRQ under the function irq_alloc_hwirqs() and again
shortly using setup_msi_irq(). During the first invocation
from irq_alloc_hwirqs(), it sets the cfg->vector and
cfg->domain of the specific IRQ. During the subsequent
invocation from setup_msi_irq(), if the cfg->domain
intersects with the target cpumask (tmp_mask) then
the move_in_progress flag is set. This flag is never cleared
unless it is set via proc file system. As this flag is not
cleared, the subsequent smp affinity set via procfs fails.

Upstream introduced IRQ domain hierarchy where they assign
the IRQ only once. However, pulling in IRQ domain hierarchy
from the upstream brings with it lot of changes (85 commits).
Hence, this patch assigns the IRQ only once.

Signed-off-by: Ashok Vairavan <ashok.vairavan@oracle.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
arch/x86/kernel/apic/msi.c