From: "tip-bot2 for Thomas Gleixner" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Thomas Gleixner <tglx@linutronix.de>,
Jonathan Cameron <Jonathan.Cameron@huawei.com>,
Michael Kelley <mhklinux@outlook.com>,
Wei Liu <wei.liu@kernel.org>, Bjorn Helgaas <bhelgaas@google.com>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: irq/msi] PCI: hv: Switch MSI descriptor locking to guard()
Date: Mon, 07 Apr 2025 14:31:43 -0000 [thread overview]
Message-ID: <174403630303.31282.7040370239515737751.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20250319105506.624838146@linutronix.de>
The following commit has been merged into the irq/msi branch of tip:
Commit-ID: 159e0676bcb0c14960aef912fbe95b0858243d51
Gitweb: https://git.kernel.org/tip/159e0676bcb0c14960aef912fbe95b0858243d51
Author: Thomas Gleixner <tglx@linutronix.de>
AuthorDate: Wed, 19 Mar 2025 11:56:55 +01:00
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Mon, 07 Apr 2025 16:24:56 +02:00
PCI: hv: Switch MSI descriptor locking to guard()
Convert the code to use the new guard(msi_descs_lock).
No functional change intended.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Michael Kelley <mhklinux@outlook.com>
Acked-by: Wei Liu <wei.liu@kernel.org>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Link: https://lore.kernel.org/all/20250319105506.624838146@linutronix.de
---
drivers/pci/controller/pci-hyperv.c | 14 ++++----------
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/drivers/pci/controller/pci-hyperv.c b/drivers/pci/controller/pci-hyperv.c
index ac27bda..e1eaa24 100644
--- a/drivers/pci/controller/pci-hyperv.c
+++ b/drivers/pci/controller/pci-hyperv.c
@@ -3975,24 +3975,18 @@ static int hv_pci_restore_msi_msg(struct pci_dev *pdev, void *arg)
{
struct irq_data *irq_data;
struct msi_desc *entry;
- int ret = 0;
if (!pdev->msi_enabled && !pdev->msix_enabled)
return 0;
- msi_lock_descs(&pdev->dev);
+ guard(msi_descs_lock)(&pdev->dev);
msi_for_each_desc(entry, &pdev->dev, MSI_DESC_ASSOCIATED) {
irq_data = irq_get_irq_data(entry->irq);
- if (WARN_ON_ONCE(!irq_data)) {
- ret = -EINVAL;
- break;
- }
-
+ if (WARN_ON_ONCE(!irq_data))
+ return -EINVAL;
hv_compose_msi_msg(irq_data, &entry->msg);
}
- msi_unlock_descs(&pdev->dev);
-
- return ret;
+ return 0;
}
/*
next prev parent reply other threads:[~2025-04-07 14:31 UTC|newest]
Thread overview: 64+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-19 10:56 [patch V4 00/14] genirq/msi: Spring cleaning Thomas Gleixner
2025-03-19 10:56 ` [patch V4 01/14] cleanup: Provide retain_ptr() Thomas Gleixner
2025-03-19 20:15 ` James Bottomley
2025-04-07 14:31 ` [tip: irq/msi] " tip-bot2 for Thomas Gleixner
2025-04-09 18:54 ` [tip: irq/msi] cleanup: Provide retain_and_null_ptr() tip-bot2 for Thomas Gleixner
2025-03-19 10:56 ` [patch V4 02/14] genirq/msi: Use lock guards for MSI descriptor locking Thomas Gleixner
2025-04-07 14:31 ` [tip: irq/msi] " tip-bot2 for Thomas Gleixner
2025-04-09 18:54 ` tip-bot2 for Thomas Gleixner
2025-03-19 10:56 ` [patch V4 03/14] soc: ti: ti_sci_inta_msi: Switch MSI descriptor locking to guard() Thomas Gleixner
2025-04-07 14:31 ` [tip: irq/msi] " tip-bot2 for Thomas Gleixner
2025-04-09 18:54 ` tip-bot2 for Thomas Gleixner
2025-03-19 10:56 ` [patch V4 04/14] NTB/msi: Switch MSI descriptor locking to lock guard() Thomas Gleixner
2025-04-07 14:31 ` [tip: irq/msi] " tip-bot2 for Thomas Gleixner
2025-04-09 18:54 ` tip-bot2 for Thomas Gleixner
2025-03-19 10:56 ` [patch V4 05/14] PCI/MSI: Use guard(msi_desc_lock) where applicable Thomas Gleixner
2025-03-19 17:08 ` Bjorn Helgaas
2025-04-07 14:31 ` [tip: irq/msi] " tip-bot2 for Thomas Gleixner
2025-04-09 18:54 ` tip-bot2 for Thomas Gleixner
2025-03-19 10:56 ` [patch V4 06/14] PCI/MSI: Set pci_dev::msi_enabled late Thomas Gleixner
2025-03-19 17:08 ` Bjorn Helgaas
2025-04-07 14:31 ` [tip: irq/msi] PCI/MSI: Set pci_dev:: Msi_enabled late tip-bot2 for Thomas Gleixner
2025-04-09 18:54 ` tip-bot2 for Thomas Gleixner
2025-03-19 10:56 ` [patch V4 07/14] PCI/MSI: Use __free() for affinity masks Thomas Gleixner
2025-03-19 17:09 ` Bjorn Helgaas
2025-04-07 14:31 ` [tip: irq/msi] " tip-bot2 for Thomas Gleixner
2025-04-09 18:54 ` tip-bot2 for Thomas Gleixner
2025-03-19 10:56 ` [patch V4 08/14] PCI/MSI: Switch msi_capability_init() to guard(msi_desc_lock) Thomas Gleixner
2025-03-19 17:09 ` Bjorn Helgaas
2025-04-07 14:31 ` [tip: irq/msi] " tip-bot2 for Thomas Gleixner
2025-04-09 18:54 ` tip-bot2 for Thomas Gleixner
2025-03-19 10:56 ` [patch V4 09/14] PCI/MSI: Switch msix_capability_init() " Thomas Gleixner
2025-03-19 17:09 ` Bjorn Helgaas
2025-04-07 14:31 ` [tip: irq/msi] " tip-bot2 for Thomas Gleixner
2025-04-08 12:04 ` commit 7b025f3f85ed causes NULL pointer dereference Bert Karwatzki
2025-04-08 15:09 ` Thomas Gleixner
2025-04-08 15:29 ` Thomas Gleixner
2025-04-08 16:20 ` Bert Karwatzki
2025-04-08 20:22 ` Klara Modin
2025-04-08 20:46 ` Thomas Gleixner
2025-04-09 11:44 ` Aithal, Srikanth
2025-04-09 11:49 ` Andy Shevchenko
2025-04-09 12:49 ` James Bottomley
2025-04-09 18:38 ` Thomas Gleixner
2025-04-09 15:22 ` Venkat Rao Bagalkote
2025-04-09 18:29 ` Borislav Petkov
2025-04-09 18:54 ` [tip: irq/msi] PCI/MSI: Switch msix_capability_init() to guard(msi_desc_lock) tip-bot2 for Thomas Gleixner
2025-03-19 10:56 ` [patch V4 10/14] PCI: hv: Switch MSI descriptor locking to guard() Thomas Gleixner
2025-04-07 14:31 ` tip-bot2 for Thomas Gleixner [this message]
2025-04-09 18:54 ` [tip: irq/msi] " tip-bot2 for Thomas Gleixner
2025-03-19 10:56 ` [patch V4 11/14] PCI/MSI: Provide a sane mechanism for TPH Thomas Gleixner
2025-04-07 14:31 ` [tip: irq/msi] " tip-bot2 for Thomas Gleixner
2025-04-09 18:54 ` tip-bot2 for Thomas Gleixner
2025-06-17 23:22 ` [patch V4 11/14] " Bjorn Helgaas
2025-06-17 23:25 ` Bjorn Helgaas
2025-03-19 10:56 ` [patch V4 12/14] PCI/TPH: Replace the broken MSI-X control word update Thomas Gleixner
2025-04-07 14:31 ` [tip: irq/msi] " tip-bot2 for Thomas Gleixner
2025-04-09 18:54 ` tip-bot2 for Thomas Gleixner
2025-03-19 10:57 ` [patch V4 13/14] scsi: ufs: qcom: Remove the MSI descriptor abuse Thomas Gleixner
2025-03-19 20:40 ` James Bottomley
2025-04-07 14:31 ` [tip: irq/msi] " tip-bot2 for Thomas Gleixner
2025-04-09 18:54 ` tip-bot2 for Thomas Gleixner
2025-03-19 10:57 ` [patch V4 14/14] genirq/msi: Rename msi_[un]lock_descs() Thomas Gleixner
2025-04-07 14:31 ` [tip: irq/msi] " tip-bot2 for Thomas Gleixner
2025-04-09 18:54 ` tip-bot2 for Thomas Gleixner
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=174403630303.31282.7040370239515737751.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=Jonathan.Cameron@huawei.com \
--cc=bhelgaas@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mhklinux@outlook.com \
--cc=tglx@linutronix.de \
--cc=wei.liu@kernel.org \
--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®