Skip to content

Commit 9ea69a5

Browse files
vivierKAGA-KOKO
authored andcommitted
powerpc/pseries: Pass MSI affinity to irq_create_mapping()
With virtio multiqueue, normally each queue IRQ is mapped to a CPU. Commit 0d9f0a5 ("virtio_scsi: use virtio IRQ affinity") exposed an existing shortcoming of the arch code by moving virtio_scsi to the automatic IRQ affinity assignment. The affinity is correctly computed in msi_desc but this is not applied to the system IRQs. It appears the affinity is correctly passed to rtas_setup_msi_irqs() but lost at this point and never passed to irq_domain_alloc_descs() (see commit 06ee6d5 ("genirq: Add affinity hint to irq allocation")) because irq_create_mapping() doesn't take an affinity parameter. Use the new irq_create_mapping_affinity() function, which allows to forward the affinity setting from rtas_setup_msi_irqs() to irq_domain_alloc_descs(). With this change, the virtqueues are correctly dispatched between the CPUs on pseries. Fixes: e75eafb ("genirq/msi: Switch to new irq spreading infrastructure") Signed-off-by: Laurent Vivier <lvivier@redhat.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Greg Kurz <groug@kaod.org> Acked-by: Michael Ellerman <mpe@ellerman.id.au> Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20201126082852.1178497-3-lvivier@redhat.com
1 parent bb4c691 commit 9ea69a5

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • arch/powerpc/platforms/pseries

arch/powerpc/platforms/pseries/msi.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,8 @@ static int rtas_setup_msi_irqs(struct pci_dev *pdev, int nvec_in, int type)
458458
return hwirq;
459459
}
460460

461-
virq = irq_create_mapping(NULL, hwirq);
461+
virq = irq_create_mapping_affinity(NULL, hwirq,
462+
entry->affinity);
462463

463464
if (!virq) {
464465
pr_debug("rtas_msi: Failed mapping hwirq %d\n", hwirq);

0 commit comments

Comments
 (0)