]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
genirq/msi: Fix populating multiple interrupts
authorJohn Keeping <john@metanate.com>
Wed, 6 Sep 2017 09:35:40 +0000 (10:35 +0100)
committerSeth Forshee <seth.forshee@canonical.com>
Thu, 12 Oct 2017 21:20:06 +0000 (16:20 -0500)
commita759f61fabb8fd895762f2e323e6ef577d098f0b
tree52da08e57f1d88a75bc609f2eed9fa41308b2737
parent51f0d6eb1f7af0534745a251cd3a0212eb6e5485
genirq/msi: Fix populating multiple interrupts

BugLink: http://bugs.launchpad.net/bugs/1721777
commit 596a7a1d0989c621c3ae49be73a1d1f9de22eb5a upstream.

On allocating the interrupts routed via a wire-to-MSI bridge, the allocator
iterates over the MSI descriptors to build the hierarchy, but fails to use
the descriptor interrupt number, and instead uses the base number,
generating the wrong IRQ domain mappings.

The fix is to use the MSI descriptor interrupt number when setting up
the interrupt instead of the base interrupt for the allocation range.

The only saving grace is that although the MSI descriptors are allocated
in bulk, the wired interrupts are only allocated one by one (so
desc->irq == virq) and the bug went unnoticed so far.

Fixes: 2145ac9310b60 ("genirq/msi: Add msi_domain_populate_irqs")
Signed-off-by: John Keeping <john@metanate.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Marc Zyngier <marc.zyngier@arm.com>
Link: http://lkml.kernel.org/r/20170906103540.373864a2.john@metanate.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
kernel/irq/msi.c