linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] PCI: allow MSI chip providers to implement their own multiple MSI setup
@ 2015-03-09 17:33 Lucas Stach
  2015-03-09 17:33 ` [PATCH 2/2] PCI: designware: implement multiple MSI irq setup Lucas Stach
  0 siblings, 1 reply; 7+ messages in thread
From: Lucas Stach @ 2015-03-09 17:33 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: Jingoo Han, Mohit Kumar, linux-pci, kernel

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
 drivers/pci/msi.c   | 3 +++
 include/linux/msi.h | 2 ++
 2 files changed, 5 insertions(+)

diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
index c3e7dfcf9ff5..9feb618d8881 100644
--- a/drivers/pci/msi.c
+++ b/drivers/pci/msi.c
@@ -121,9 +121,12 @@ void __weak arch_teardown_msi_irq(unsigned int irq)
 
 int __weak arch_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
 {
+	struct msi_controller *chip = pci_msi_controller(dev);
 	struct msi_desc *entry;
 	int ret;
 
+	if (chip && chip->setup_irqs)
+		return chip->setup_irqs(chip, dev, nvec, type);
 	/*
 	 * If an architecture wants to support multiple MSI, it needs to
 	 * override arch_setup_msi_irqs()
diff --git a/include/linux/msi.h b/include/linux/msi.h
index 8ac4a68ffae2..50fefeb30236 100644
--- a/include/linux/msi.h
+++ b/include/linux/msi.h
@@ -114,6 +114,8 @@ struct msi_controller {
 
 	int (*setup_irq)(struct msi_controller *chip, struct pci_dev *dev,
 			 struct msi_desc *desc);
+	int (*setup_irqs)(struct msi_controller *chip, struct pci_dev *dev,
+			  int nvec, int type);
 	void (*teardown_irq)(struct msi_controller *chip, unsigned int irq);
 };
 
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-04-08 18:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-09 17:33 [PATCH 1/2] PCI: allow MSI chip providers to implement their own multiple MSI setup Lucas Stach
2015-03-09 17:33 ` [PATCH 2/2] PCI: designware: implement multiple MSI irq setup Lucas Stach
2015-03-20 22:07   ` Bjorn Helgaas
2015-03-30 11:17     ` Lucas Stach
2015-04-08  9:10       ` Lucas Stach
2015-04-08 18:54       ` Bjorn Helgaas
2015-04-08 18:56   ` Bjorn Helgaas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).