[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [patch V3 28/35] PCI/MSI: Simplify pci_irq_get_affinity()
- To: Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Nathan Chancellor <nathan@xxxxxxxxxx>
- From: Cédric Le Goater <clg@xxxxxxxx>
- Date: Sat, 18 Dec 2021 21:25:40 +0100
- Authentication-results: garm.ovh; auth=pass (GARM-97G0022d2cf51f-56be-41f7-b9ac-2c271cc1d1bb, B1F2FCB93787BB0875C07E604CDE73E7ADF677F7) smtp.auth=clg@xxxxxxxx
- Cc: LKML <linux-kernel@xxxxxxxxxxxxxxx>, Bjorn Helgaas <helgaas@xxxxxxxxxx>, Marc Zygnier <maz@xxxxxxxxxx>, Alex Williamson <alex.williamson@xxxxxxxxxx>, Kevin Tian <kevin.tian@xxxxxxxxx>, Jason Gunthorpe <jgg@xxxxxxxxxx>, Megha Dey <megha.dey@xxxxxxxxx>, Ashok Raj <ashok.raj@xxxxxxxxx>, <linux-pci@xxxxxxxxxxxxxxx>, Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Arnd Bergmann <arnd@xxxxxxxx>, Michael Ellerman <mpe@xxxxxxxxxxxxxx>, Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>, <linuxppc-dev@xxxxxxxxxxxxxxxx>, Bjorn Helgaas <bhelgaas@xxxxxxxxxx>, Stuart Yoder <stuyoder@xxxxxxxxx>, Laurentiu Tudor <laurentiu.tudor@xxxxxxx>, Nishanth Menon <nm@xxxxxx>, Tero Kristo <kristo@xxxxxxxxxx>, Santosh Shilimkar <ssantosh@xxxxxxxxxx>, <linux-arm-kernel@xxxxxxxxxxxxxxxxxxx>, Vinod Koul <vkoul@xxxxxxxxxx>, <dmaengine@xxxxxxxxxxxxxxx>, Mark Rutland <mark.rutland@xxxxxxx>, Will Deacon <will@xxxxxxxxxx>, Robin Murphy <robin.murphy@xxxxxxx>, Joerg Roedel <joro@xxxxxxxxxx>, <iommu@xxxxxxxxxxxxxxxxxxxxxxxxxx>, Jassi Brar <jassisinghbrar@xxxxxxxxx>, Peter Ujfalusi <peter.ujfalusi@xxxxxxxxx>, Sinan Kaya <okaya@xxxxxxxxxx>
- Delivery-date: Sat, 18 Dec 2021 20:26:24 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 12/18/21 11:25, Thomas Gleixner wrote:
On Fri, Dec 17 2021 at 15:30, Nathan Chancellor wrote:
On Fri, Dec 10, 2021 at 11:19:26PM +0100, Thomas Gleixner wrote:
I just bisected a boot failure on my AMD test desktop to this patch as
commit f48235900182 ("PCI/MSI: Simplify pci_irq_get_affinity()") in
-next. It looks like there is a problem with the NVMe drive after this
change according to the logs. Given that the hard drive is not getting
mounted for journald to write logs to, I am not really sure how to get
them from the machine so I have at least taken a picture of what I see
on my screen; open to ideas on that front!
Bah. Fix below.
That's a fix for the issue I was seeing on pseries with NVMe.
Tested-by: Cédric Le Goater <clg@xxxxxxxx>
Thanks,
C.
Thanks,
tglx
---
diff --git a/drivers/pci/msi/msi.c b/drivers/pci/msi/msi.c
index 71802410e2ab..9b4910befeda 100644
--- a/drivers/pci/msi/msi.c
+++ b/drivers/pci/msi/msi.c
@@ -1100,7 +1100,7 @@ EXPORT_SYMBOL(pci_irq_vector);
*/
const struct cpumask *pci_irq_get_affinity(struct pci_dev *dev, int nr)
{
- int irq = pci_irq_vector(dev, nr);
+ int idx, irq = pci_irq_vector(dev, nr);
struct msi_desc *desc;
if (WARN_ON_ONCE(irq <= 0))
@@ -1113,7 +1113,10 @@ const struct cpumask *pci_irq_get_affinity(struct
pci_dev *dev, int nr)
if (WARN_ON_ONCE(!desc->affinity))
return NULL;
- return &desc->affinity[nr].mask;
+
+ /* MSI has a mask array in the descriptor. */
+ idx = dev->msi_enabled ? nr : 0;
+ return &desc->affinity[idx].mask;
}
EXPORT_SYMBOL(pci_irq_get_affinity);
|