2021-12-06 22:53:21

by Thomas Gleixner

[permalink] [raw]
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 <[email protected]>
Tested-by: Niklas Schnelle <[email protected]>
Acked-by: Niklas Schnelle <[email protected]>
Cc: [email protected]
Cc: Heiko Carstens <[email protected]>
Cc: Christian Borntraeger <[email protected]>
---
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;



Subject: [tip: irq/msi] s390/pci: Rework MSI descriptor walk

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

Commit-ID: 2ca5e908d0f4cde61d9d3595e8314adca5d914a1
Gitweb: https://git.kernel.org/tip/2ca5e908d0f4cde61d9d3595e8314adca5d914a1
Author: Thomas Gleixner <[email protected]>
AuthorDate: Mon, 06 Dec 2021 23:51:23 +01:00
Committer: Thomas Gleixner <[email protected]>
CommitterDate: Thu, 16 Dec 2021 22:22:18 +01:00

s390/pci: Rework MSI descriptor walk

Replace the about to vanish iterators and make use of the filtering.

Signed-off-by: Thomas Gleixner <[email protected]>
Tested-by: Niklas Schnelle <[email protected]>
Reviewed-by: Jason Gunthorpe <[email protected]>
Acked-by: Niklas Schnelle <[email protected]>
Link: https://lore.kernel.org/r/[email protected]

---
arch/s390/pci/pci_irq.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/s390/pci/pci_irq.c b/arch/s390/pci/pci_irq.c
index 2beb8a0..0975ff3 100644
--- 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 *pdev, int nvec, int type)

/* 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_dev *pdev)
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;