[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <162858646108.395.9412874888117593842.tip-bot2@tip-bot2>
Date: Tue, 10 Aug 2021 09:07:41 -0000
From: "tip-bot2 for Thomas Gleixner" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Thomas Gleixner <tglx@...utronix.de>,
Marc Zyngier <maz@...nel.org>,
Bjorn Helgaas <bhelgaas@...gle.com>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: [tip: irq/core] PCI/MSI: Simplify msi_verify_entries()
The following commit has been merged into the irq/core branch of tip:
Commit-ID: a6e8b946508cda3c3bf0f9b0e133d293dc9754f6
Gitweb: https://git.kernel.org/tip/a6e8b946508cda3c3bf0f9b0e133d293dc9754f6
Author: Thomas Gleixner <tglx@...utronix.de>
AuthorDate: Thu, 29 Jul 2021 23:51:52 +02:00
Committer: Thomas Gleixner <tglx@...utronix.de>
CommitterDate: Tue, 10 Aug 2021 11:03:29 +02:00
PCI/MSI: Simplify msi_verify_entries()
No point in looping over all entries when 64bit addressing mode is enabled
for nothing.
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Tested-by: Marc Zyngier <maz@...nel.org>
Reviewed-by: Marc Zyngier <maz@...nel.org>
Acked-by: Bjorn Helgaas <bhelgaas@...gle.com>
Link: https://lore.kernel.org/r/20210729222542.992849326@linutronix.de
---
drivers/pci/msi.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
index 95e6ce4..b59957c 100644
--- a/drivers/pci/msi.c
+++ b/drivers/pci/msi.c
@@ -613,8 +613,11 @@ static int msi_verify_entries(struct pci_dev *dev)
{
struct msi_desc *entry;
+ if (!dev->no_64bit_msi)
+ return 0;
+
for_each_pci_msi_entry(entry, dev) {
- if (entry->msg.address_hi && dev->no_64bit_msi) {
+ if (entry->msg.address_hi) {
pci_err(dev, "arch assigned 64-bit MSI address %#x%08x but device only supports 32 bits\n",
entry->msg.address_hi, entry->msg.address_lo);
return -EIO;
Powered by blists - more mailing lists