[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211206210748.305656158@linutronix.de>
Date: Mon, 6 Dec 2021 23:51:23 +0100 (CET)
From: Thomas Gleixner <tglx@...utronix.de>
To: LKML <linux-kernel@...r.kernel.org>
Cc: Bjorn Helgaas <helgaas@...nel.org>, Marc Zygnier <maz@...nel.org>,
Alex Williamson <alex.williamson@...hat.com>,
Kevin Tian <kevin.tian@...el.com>,
Jason Gunthorpe <jgg@...dia.com>,
Megha Dey <megha.dey@...el.com>,
Ashok Raj <ashok.raj@...el.com>, linux-pci@...r.kernel.org,
Cedric Le Goater <clg@...d.org>,
xen-devel@...ts.xenproject.org, Juergen Gross <jgross@...e.com>,
Niklas Schnelle <schnelle@...ux.ibm.com>,
linux-s390@...r.kernel.org, Heiko Carstens <hca@...ux.ibm.com>,
Christian Borntraeger <borntraeger@...ibm.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Logan Gunthorpe <logang@...tatee.com>,
Jon Mason <jdmason@...zu.us>,
Dave Jiang <dave.jiang@...el.com>,
Allen Hubbe <allenbh@...il.com>, linux-ntb@...glegroups.com
Subject: [patch V2 13/31] s390/pci: Rework MSI descriptor walk
Replace the about to vanish iterators and make use of the filtering.
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Tested-by: Niklas Schnelle <schnelle@...ux.ibm.com>
Acked-by: Niklas Schnelle <schnelle@...ux.ibm.com>
Cc: linux-s390@...r.kernel.org
Cc: Heiko Carstens <hca@...ux.ibm.com>
Cc: Christian Borntraeger <borntraeger@...ibm.com>
---
arch/s390/pci/pci_irq.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
--- a/arch/s390/pci/pci_irq.c
+++ b/arch/s390/pci/pci_irq.c
@@ -303,7 +303,7 @@ int arch_setup_msi_irqs(struct pci_dev *
/* Request MSI interrupts */
hwirq = bit;
- for_each_pci_msi_entry(msi, pdev) {
+ msi_for_each_desc(msi, &pdev->dev, MSI_DESC_NOTASSOCIATED) {
rc = -EIO;
if (hwirq - bit >= msi_vecs)
break;
@@ -362,9 +362,7 @@ void arch_teardown_msi_irqs(struct pci_d
return;
/* Release MSI interrupts */
- for_each_pci_msi_entry(msi, pdev) {
- if (!msi->irq)
- continue;
+ msi_for_each_desc(msi, &pdev->dev, MSI_DESC_ASSOCIATED) {
irq_set_msi_desc(msi->irq, NULL);
irq_free_desc(msi->irq);
msi->msg.address_lo = 0;
Powered by blists - more mailing lists