All of lore.kernel.org
 help / color / mirror / Atom feed
From: "tip-bot2 for Thomas Gleixner" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Thomas Gleixner <tglx@linutronix.de>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	Jason Gunthorpe <jgg@nvidia.com>,
	Bjorn Helgaas <bhelgaas@google.com>,
	x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: irq/msi] PCI/MSI: Move msi_lock to struct pci_dev
Date: Thu, 09 Dec 2021 16:06:59 -0000	[thread overview]
Message-ID: <163906601949.11128.5546155304919293462.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20211206210224.925241961@linutronix.de>

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

Commit-ID:     cd119b09a87d8beb50356d8c5c6aa42d89c44eb7
Gitweb:        https://git.kernel.org/tip/cd119b09a87d8beb50356d8c5c6aa42d89c44eb7
Author:        Thomas Gleixner <tglx@linutronix.de>
AuthorDate:    Mon, 06 Dec 2021 23:27:56 +01:00
Committer:     Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Thu, 09 Dec 2021 11:52:22 +01:00

PCI/MSI: Move msi_lock to struct pci_dev

It's only required for PCI/MSI. So no point in having it in every struct
device.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Link: https://lore.kernel.org/r/20211206210224.925241961@linutronix.de

---
 drivers/base/core.c    | 1 -
 drivers/pci/msi/msi.c  | 2 +-
 drivers/pci/probe.c    | 4 +++-
 include/linux/device.h | 2 --
 include/linux/pci.h    | 1 +
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/base/core.c b/drivers/base/core.c
index fd034d7..f26c668 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -2875,7 +2875,6 @@ void device_initialize(struct device *dev)
 	device_pm_init(dev);
 	set_dev_node(dev, NUMA_NO_NODE);
 #ifdef CONFIG_GENERIC_MSI_IRQ
-	raw_spin_lock_init(&dev->msi_lock);
 	INIT_LIST_HEAD(&dev->msi_list);
 #endif
 	INIT_LIST_HEAD(&dev->links.consumers);
diff --git a/drivers/pci/msi/msi.c b/drivers/pci/msi/msi.c
index 465fe9e..443a16c 100644
--- a/drivers/pci/msi/msi.c
+++ b/drivers/pci/msi/msi.c
@@ -18,7 +18,7 @@ int pci_msi_ignore_mask;
 
 static noinline void pci_msi_update_mask(struct msi_desc *desc, u32 clear, u32 set)
 {
-	raw_spinlock_t *lock = &desc->dev->msi_lock;
+	raw_spinlock_t *lock = &to_pci_dev(desc->dev)->msi_lock;
 	unsigned long flags;
 
 	if (!desc->pci.msi_attrib.can_mask)
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 087d365..443efb0 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -2311,7 +2311,9 @@ struct pci_dev *pci_alloc_dev(struct pci_bus *bus)
 	INIT_LIST_HEAD(&dev->bus_list);
 	dev->dev.type = &pci_dev_type;
 	dev->bus = pci_bus_get(bus);
-
+#ifdef CONFIG_PCI_MSI
+	raw_spin_lock_init(&dev->msi_lock);
+#endif
 	return dev;
 }
 EXPORT_SYMBOL(pci_alloc_dev);
diff --git a/include/linux/device.h b/include/linux/device.h
index e270cb7..2a22875 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -407,7 +407,6 @@ struct dev_links_info {
  * @em_pd:	device's energy model performance domain
  * @pins:	For device pin management.
  *		See Documentation/driver-api/pin-control.rst for details.
- * @msi_lock:	Lock to protect MSI mask cache and mask register
  * @msi_list:	Hosts MSI descriptors
  * @msi_domain: The generic MSI domain this device is using.
  * @numa_node:	NUMA node this device is close to.
@@ -508,7 +507,6 @@ struct device {
 	struct dev_pin_info	*pins;
 #endif
 #ifdef CONFIG_GENERIC_MSI_IRQ
-	raw_spinlock_t		msi_lock;
 	struct list_head	msi_list;
 #endif
 #ifdef CONFIG_DMA_OPS
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 8cb1036..5cc46ba 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -474,6 +474,7 @@ struct pci_dev {
 #endif
 #ifdef CONFIG_PCI_MSI
 	void __iomem	*msix_base;
+	raw_spinlock_t	msi_lock;
 	const struct attribute_group **msi_irq_groups;
 #endif
 	struct pci_vpd	vpd;

  parent reply	other threads:[~2021-12-09 16:07 UTC|newest]

Thread overview: 200+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-06 22:27 [patch V2 00/23] genirq/msi, PCI/MSI: Spring cleaning - Part 1 Thomas Gleixner
2021-12-06 22:27 ` Thomas Gleixner
2021-12-06 22:27 ` Thomas Gleixner
2021-12-06 22:27 ` [patch V2 01/23] powerpc/4xx: Remove MSI support which never worked Thomas Gleixner
2021-12-06 22:27   ` Thomas Gleixner
2021-12-06 22:27   ` Thomas Gleixner
2021-12-07  7:21   ` Cédric Le Goater
2021-12-07  7:21     ` Cédric Le Goater
2021-12-07  7:21     ` Cédric Le Goater
2021-12-07 11:36     ` Michael Ellerman
2021-12-07 11:36       ` Michael Ellerman
2021-12-07 11:36       ` Michael Ellerman
2021-12-07 15:50       ` Cédric Le Goater
2021-12-07 15:50         ` Cédric Le Goater
2021-12-07 15:50         ` Cédric Le Goater
2021-12-07 20:42         ` Thomas Gleixner
2021-12-07 20:42           ` Thomas Gleixner
2021-12-07 20:42           ` Thomas Gleixner
2021-12-08 10:44           ` Cédric Le Goater
2021-12-08 10:44             ` Cédric Le Goater
2021-12-08 10:44             ` Cédric Le Goater
2021-12-09 16:07             ` [tip: irq/msi] powerpc/4xx: Complete removal of MSI support tip-bot2 for Cédric Le Goater
2021-12-09 16:07   ` [tip: irq/msi] powerpc/4xx: Remove MSI support which never worked tip-bot2 for Thomas Gleixner
2021-12-06 22:27 ` [patch V2 02/23] PCI/MSI: Fix pci_irq_vector()/pci_irq_get_affinity() Thomas Gleixner
2021-12-06 22:27   ` Thomas Gleixner
2021-12-06 22:27   ` Thomas Gleixner
2021-12-07 20:53   ` Bjorn Helgaas
2021-12-07 20:53     ` Bjorn Helgaas
2021-12-07 20:53     ` Bjorn Helgaas
2021-12-09 16:07   ` [tip: irq/msi] " tip-bot2 for Thomas Gleixner
2021-12-06 22:27 ` [patch V2 03/23] genirq/msi: Guard sysfs code Thomas Gleixner
2021-12-06 22:27   ` Thomas Gleixner
2021-12-06 22:27   ` Thomas Gleixner
2021-12-07  7:42   ` Greg Kroah-Hartman
2021-12-07  7:42     ` Greg Kroah-Hartman
2021-12-07  7:42     ` Greg Kroah-Hartman
2021-12-09 16:07   ` [tip: irq/msi] " tip-bot2 for Thomas Gleixner
2021-12-06 22:27 ` [patch V2 04/23] genirq/msi: Remove unused domain callbacks Thomas Gleixner
2021-12-06 22:27   ` Thomas Gleixner
2021-12-06 22:27   ` Thomas Gleixner
2021-12-06 22:27 ` [patch V2 05/23] genirq/msi: Fixup includes Thomas Gleixner
2021-12-06 22:27   ` Thomas Gleixner
2021-12-06 22:27   ` Thomas Gleixner
2021-12-07  7:43   ` Greg Kroah-Hartman
2021-12-07  7:43     ` Greg Kroah-Hartman
2021-12-07  7:43     ` Greg Kroah-Hartman
2021-12-09 16:07   ` [tip: irq/msi] " tip-bot2 for Thomas Gleixner
2021-12-06 22:27 ` [patch V2 06/23] PCI/MSI: Make pci_msi_domain_write_msg() static Thomas Gleixner
2021-12-06 22:27   ` Thomas Gleixner
2021-12-06 22:27   ` Thomas Gleixner
2021-12-07 20:54   ` Bjorn Helgaas
2021-12-07 20:54     ` Bjorn Helgaas
2021-12-07 20:54     ` Bjorn Helgaas
2021-12-09 16:07   ` [tip: irq/msi] " tip-bot2 for Thomas Gleixner
2021-12-06 22:27 ` [patch V2 07/23] PCI/MSI: Remove msi_desc_to_pci_sysdata() Thomas Gleixner
2021-12-06 22:27   ` Thomas Gleixner
2021-12-06 22:27   ` Thomas Gleixner
2021-12-07 20:55   ` Bjorn Helgaas
2021-12-07 20:55     ` Bjorn Helgaas
2021-12-07 20:55     ` Bjorn Helgaas
2021-12-09 16:07   ` [tip: irq/msi] " tip-bot2 for Thomas Gleixner
2021-12-06 22:27 ` [patch V2 08/23] PCI/sysfs: Use pci_irq_vector() Thomas Gleixner
2021-12-06 22:27   ` Thomas Gleixner
2021-12-06 22:27   ` Thomas Gleixner
2021-12-07  7:43   ` Greg Kroah-Hartman
2021-12-07  7:43     ` Greg Kroah-Hartman
2021-12-07  7:43     ` Greg Kroah-Hartman
2021-12-07 20:56   ` Bjorn Helgaas
2021-12-07 20:56     ` Bjorn Helgaas
2021-12-07 20:56     ` Bjorn Helgaas
2021-12-09 16:07   ` [tip: irq/msi] " tip-bot2 for Thomas Gleixner
2021-12-06 22:27 ` [patch V2 09/23] MIPS: Octeon: Use arch_setup_msi_irq() Thomas Gleixner
2021-12-06 22:27   ` Thomas Gleixner
2021-12-06 22:27   ` Thomas Gleixner
2021-12-09 16:07   ` [tip: irq/msi] " tip-bot2 for Thomas Gleixner
2021-12-06 22:27 ` [patch V2 10/23] genirq/msi, treewide: Use a named struct for PCI/MSI attributes Thomas Gleixner
2021-12-06 22:27   ` Thomas Gleixner
2021-12-06 22:27   ` Thomas Gleixner
2021-12-07  7:44   ` Greg Kroah-Hartman
2021-12-07  7:44     ` Greg Kroah-Hartman
2021-12-07  7:44     ` Greg Kroah-Hartman
2021-12-09 16:07   ` [tip: irq/msi] " tip-bot2 for Thomas Gleixner
2021-12-06 22:27 ` [patch V2 11/23] x86/hyperv: Refactor hv_msi_domain_free_irqs() Thomas Gleixner
2021-12-06 22:27   ` Thomas Gleixner
2021-12-06 22:27   ` Thomas Gleixner
2021-12-09 16:07   ` [tip: irq/msi] " tip-bot2 for Thomas Gleixner
2021-12-06 22:27 ` [patch V2 12/23] PCI/MSI: Make arch_restore_msi_irqs() less horrible Thomas Gleixner
2021-12-06 22:27   ` Thomas Gleixner
2021-12-06 22:27   ` Thomas Gleixner
2021-12-07 20:56   ` Bjorn Helgaas
2021-12-07 20:56     ` Bjorn Helgaas
2021-12-07 20:56     ` Bjorn Helgaas
2021-12-09 16:07   ` [tip: irq/msi] " tip-bot2 for Thomas Gleixner
2021-12-06 22:27 ` [patch V2 13/23] PCI/MSI: Cleanup include zoo Thomas Gleixner
2021-12-06 22:27   ` Thomas Gleixner
2021-12-06 22:27   ` Thomas Gleixner
2021-12-07 20:57   ` Bjorn Helgaas
2021-12-07 20:57     ` Bjorn Helgaas
2021-12-07 20:57     ` Bjorn Helgaas
2021-12-09 16:07   ` [tip: irq/msi] " tip-bot2 for Thomas Gleixner
2021-12-06 22:27 ` [patch V2 14/23] PCI/MSI: Make msix_update_entries() smarter Thomas Gleixner
2021-12-06 22:27   ` Thomas Gleixner
2021-12-06 22:27   ` Thomas Gleixner
2021-12-07  7:44   ` Greg Kroah-Hartman
2021-12-07  7:44     ` Greg Kroah-Hartman
2021-12-07  7:44     ` Greg Kroah-Hartman
2021-12-07 20:57   ` Bjorn Helgaas
2021-12-07 20:57     ` Bjorn Helgaas
2021-12-07 20:57     ` Bjorn Helgaas
2021-12-09 16:07   ` [tip: irq/msi] " tip-bot2 for Thomas Gleixner
2021-12-06 22:27 ` [patch V2 15/23] PCI/MSI: Move code into a separate directory Thomas Gleixner
2021-12-06 22:27   ` Thomas Gleixner
2021-12-06 22:27   ` Thomas Gleixner
2021-12-07 20:57   ` Bjorn Helgaas
2021-12-07 20:57     ` Bjorn Helgaas
2021-12-07 20:57     ` Bjorn Helgaas
2021-12-09 16:07   ` [tip: irq/msi] " tip-bot2 for Thomas Gleixner
2021-12-06 22:27 ` [patch V2 16/23] PCI/MSI: Split out CONFIG_PCI_MSI independent part Thomas Gleixner
2021-12-06 22:27   ` Thomas Gleixner
2021-12-06 22:27   ` Thomas Gleixner
2021-12-07  7:45   ` Greg Kroah-Hartman
2021-12-07  7:45     ` Greg Kroah-Hartman
2021-12-07  7:45     ` Greg Kroah-Hartman
2021-12-07 20:58   ` Bjorn Helgaas
2021-12-07 20:58     ` Bjorn Helgaas
2021-12-07 20:58     ` Bjorn Helgaas
2021-12-09 16:07   ` [tip: irq/msi] " tip-bot2 for Thomas Gleixner
2021-12-06 22:27 ` [patch V2 17/23] PCI/MSI: Split out !IRQDOMAIN code Thomas Gleixner
2021-12-06 22:27   ` Thomas Gleixner
2021-12-06 22:27   ` Thomas Gleixner
2021-12-07  7:45   ` Greg Kroah-Hartman
2021-12-07  7:45     ` Greg Kroah-Hartman
2021-12-07  7:45     ` Greg Kroah-Hartman
2021-12-07 20:59   ` Bjorn Helgaas
2021-12-07 20:59     ` Bjorn Helgaas
2021-12-07 20:59     ` Bjorn Helgaas
2021-12-09 16:07   ` [tip: irq/msi] " tip-bot2 for Thomas Gleixner
2021-12-06 22:27 ` [patch V2 18/23] PCI/MSI: Split out irqdomain code Thomas Gleixner
2021-12-06 22:27   ` Thomas Gleixner
2021-12-06 22:27   ` Thomas Gleixner
2021-12-07  7:46   ` Greg Kroah-Hartman
2021-12-07  7:46     ` Greg Kroah-Hartman
2021-12-07  7:46     ` Greg Kroah-Hartman
2021-12-07 21:00   ` Bjorn Helgaas
2021-12-07 21:00     ` Bjorn Helgaas
2021-12-07 21:00     ` Bjorn Helgaas
2021-12-09 16:07   ` [tip: irq/msi] " tip-bot2 for Thomas Gleixner
2021-12-06 22:27 ` [patch V2 19/23] PCI/MSI: Sanitize MSIX table map handling Thomas Gleixner
2021-12-06 22:27   ` Thomas Gleixner
2021-12-06 22:27   ` Thomas Gleixner
2021-12-07 21:01   ` Bjorn Helgaas
2021-12-07 21:01     ` Bjorn Helgaas
2021-12-07 21:01     ` Bjorn Helgaas
2021-12-09 16:07   ` [tip: irq/msi] PCI/MSI: Sanitize MSI-X " tip-bot2 for Thomas Gleixner
2021-12-06 22:27 ` [patch V2 20/23] PCI/MSI: Move msi_lock to struct pci_dev Thomas Gleixner
2021-12-06 22:27   ` Thomas Gleixner
2021-12-06 22:27   ` Thomas Gleixner
2021-12-07  7:47   ` Greg Kroah-Hartman
2021-12-07  7:47     ` Greg Kroah-Hartman
2021-12-07  7:47     ` Greg Kroah-Hartman
2021-12-07 21:01   ` Bjorn Helgaas
2021-12-07 21:01     ` Bjorn Helgaas
2021-12-07 21:01     ` Bjorn Helgaas
2021-12-08 15:29   ` Jason Gunthorpe
2021-12-08 15:29     ` Jason Gunthorpe
2021-12-08 15:29     ` Jason Gunthorpe
2021-12-08 20:56     ` Thomas Gleixner
2021-12-08 20:56       ` Thomas Gleixner
2021-12-08 20:56       ` Thomas Gleixner
2021-12-09 16:06   ` tip-bot2 for Thomas Gleixner [this message]
2021-12-06 22:27 ` [patch V2 21/23] PCI/MSI: Make pci_msi_domain_check_cap() static Thomas Gleixner
2021-12-06 22:27   ` Thomas Gleixner
2021-12-06 22:27   ` Thomas Gleixner
2021-12-07  7:47   ` Greg Kroah-Hartman
2021-12-07  7:47     ` Greg Kroah-Hartman
2021-12-07  7:47     ` Greg Kroah-Hartman
2021-12-07 21:01   ` Bjorn Helgaas
2021-12-07 21:01     ` Bjorn Helgaas
2021-12-07 21:01     ` Bjorn Helgaas
2021-12-09 16:06   ` [tip: irq/msi] " tip-bot2 for Thomas Gleixner
2021-12-06 22:27 ` [patch V2 22/23] genirq/msi: Handle PCI/MSI allocation fail in core code Thomas Gleixner
2021-12-06 22:27   ` Thomas Gleixner
2021-12-06 22:27   ` Thomas Gleixner
2021-12-07  7:48   ` Greg Kroah-Hartman
2021-12-07  7:48     ` Greg Kroah-Hartman
2021-12-07  7:48     ` Greg Kroah-Hartman
2021-12-07 21:02   ` Bjorn Helgaas
2021-12-07 21:02     ` Bjorn Helgaas
2021-12-07 21:02     ` Bjorn Helgaas
2021-12-09 16:06   ` [tip: irq/msi] " tip-bot2 for Thomas Gleixner
2021-12-06 22:28 ` [patch V2 23/23] PCI/MSI: Move descriptor counting on allocation fail to the legacy code Thomas Gleixner
2021-12-06 22:28   ` Thomas Gleixner
2021-12-06 22:28   ` Thomas Gleixner
2021-12-07  7:48   ` Greg Kroah-Hartman
2021-12-07  7:48     ` Greg Kroah-Hartman
2021-12-07  7:48     ` Greg Kroah-Hartman
2021-12-07 21:02   ` Bjorn Helgaas
2021-12-07 21:02     ` Bjorn Helgaas
2021-12-07 21:02     ` Bjorn Helgaas
2021-12-09 16:06   ` [tip: irq/msi] " 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=163906601949.11128.5546155304919293462.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=bhelgaas@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jgg@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.