mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "tip-bot2 for Laurent Vivier" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Laurent Vivier <lvivier@redhat.com>,
	Thomas Gleixner <tglx@linutronix.de>, Greg Kurz <groug@kaod.org>,
	Michael Ellerman <mpe@ellerman.id.au>,
	stable@vger.kernel.org, x86@kernel.org,
	linux-kernel@vger.kernel.org, maz@kernel.org
Subject: [tip: irq/urgent] powerpc/pseries: Pass MSI affinity to irq_create_mapping()
Date: Mon, 30 Nov 2020 11:29:02 -0000	[thread overview]
Message-ID: <160673574245.3364.4192827087700999581.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20201126082852.1178497-3-lvivier@redhat.com>

The following commit has been merged into the irq/urgent branch of tip:

Commit-ID:     9ea69a55b3b9a71cded9726af591949c1138f235
Gitweb:        https://git.kernel.org/tip/9ea69a55b3b9a71cded9726af591949c1138f235
Author:        Laurent Vivier <lvivier@redhat.com>
AuthorDate:    Thu, 26 Nov 2020 09:28:52 +01:00
Committer:     Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Mon, 30 Nov 2020 12:22:04 +01:00

powerpc/pseries: Pass MSI affinity to irq_create_mapping()

With virtio multiqueue, normally each queue IRQ is mapped to a CPU.

Commit 0d9f0a52c8b9f ("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 06ee6d571f0e ("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: e75eafb9b039 ("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
---
 arch/powerpc/platforms/pseries/msi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/powerpc/platforms/pseries/msi.c b/arch/powerpc/platforms/pseries/msi.c
index 133f6ad..b3ac245 100644
--- a/arch/powerpc/platforms/pseries/msi.c
+++ b/arch/powerpc/platforms/pseries/msi.c
@@ -458,7 +458,8 @@ again:
 			return hwirq;
 		}
 
-		virq = irq_create_mapping(NULL, hwirq);
+		virq = irq_create_mapping_affinity(NULL, hwirq,
+						   entry->affinity);
 
 		if (!virq) {
 			pr_debug("rtas_msi: Failed mapping hwirq %d\n", hwirq);

      reply	other threads:[~2020-11-30 11:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-26  8:28 [PATCH v4 0/2] powerpc/pseries: fix MSI/X IRQ affinity on pseries Laurent Vivier
2020-11-26  8:28 ` [PATCH v4 1/2] genirq/irqdomain: Add an irq_create_mapping_affinity() function Laurent Vivier
2020-11-30 11:29   ` [tip: irq/urgent] " tip-bot2 for Laurent Vivier
2020-11-26  8:28 ` [PATCH v4 2/2] powerpc/pseries: Pass MSI affinity to irq_create_mapping() Laurent Vivier
2020-11-30 11:29   ` tip-bot2 for Laurent Vivier [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=160673574245.3364.4192827087700999581.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=groug@kaod.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=lvivier@redhat.com \
    --cc=maz@kernel.org \
    --cc=mpe@ellerman.id.au \
    --cc=stable@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®