[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1411614872-4009-21-git-send-email-wangyijing@huawei.com>
Date: Thu, 25 Sep 2014 11:14:30 +0800
From: Yijing Wang <wangyijing@...wei.com>
To: Bjorn Helgaas <bhelgaas@...gle.com>
CC: <linux-pci@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
Xinwei Hu <huxinwei@...wei.com>, Wuyun <wuyun.wu@...wei.com>,
<linux-arm-kernel@...ts.infradead.org>,
Russell King <linux@....linux.org.uk>,
<linux-arch@...r.kernel.org>, <arnab.basu@...escale.com>,
<Bharat.Bhushan@...escale.com>, <x86@...nel.org>,
Arnd Bergmann <arnd@...db.de>,
Thomas Gleixner <tglx@...utronix.de>,
"Konrad Rzeszutek Wilk" <konrad.wilk@...cle.com>,
<xen-devel@...ts.xenproject.org>, Joerg Roedel <joro@...tes.org>,
<iommu@...ts.linux-foundation.org>, <linux-mips@...ux-mips.org>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
<linuxppc-dev@...ts.ozlabs.org>, <linux-s390@...r.kernel.org>,
Sebastian Ott <sebott@...ux.vnet.ibm.com>,
"Tony Luck" <tony.luck@...el.com>, <linux-ia64@...r.kernel.org>,
"David S. Miller" <davem@...emloft.net>,
<sparclinux@...r.kernel.org>, Chris Metcalf <cmetcalf@...era.com>,
Ralf Baechle <ralf@...ux-mips.org>,
Lucas Stach <l.stach@...gutronix.de>,
David Vrabel <david.vrabel@...rix.com>,
"Sergei Shtylyov" <sergei.shtylyov@...entembedded.com>,
Michael Ellerman <mpe@...erman.id.au>,
Thierry Reding <thierry.reding@...il.com>,
"Thomas Petazzoni" <thomas.petazzoni@...e-electrons.com>,
Yijing Wang <wangyijing@...wei.com>
Subject: [PATCH v2 20/22] Sparc/MSI: Use MSI chip framework to configure MSI/MSI-X irq
Use MSI chip framework instead of arch MSI functions to configure
MSI/MSI-X irq. So we can manage MSI/MSI-X irq in a unified framework.
Signed-off-by: Yijing Wang <wangyijing@...wei.com>
---
arch/sparc/kernel/pci.c | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/arch/sparc/kernel/pci.c b/arch/sparc/kernel/pci.c
index b36365f..2a89ee2 100644
--- a/arch/sparc/kernel/pci.c
+++ b/arch/sparc/kernel/pci.c
@@ -905,7 +905,7 @@ int pci_domain_nr(struct pci_bus *pbus)
EXPORT_SYMBOL(pci_domain_nr);
#ifdef CONFIG_PCI_MSI
-int arch_setup_msi_irq(struct pci_dev *pdev, struct msi_desc *desc)
+int sparc_setup_msi_irq(struct pci_dev *pdev, struct msi_desc *desc)
{
struct pci_pbm_info *pbm = pdev->dev.archdata.host_controller;
unsigned int irq;
@@ -916,7 +916,7 @@ int arch_setup_msi_irq(struct pci_dev *pdev, struct msi_desc *desc)
return pbm->setup_msi_irq(&irq, pdev, desc);
}
-void arch_teardown_msi_irq(unsigned int irq)
+void sparc_teardown_msi_irq(unsigned int irq)
{
struct msi_desc *entry = irq_get_msi_desc(irq);
struct pci_dev *pdev = entry->dev;
@@ -925,6 +925,16 @@ void arch_teardown_msi_irq(unsigned int irq)
if (pbm->teardown_msi_irq)
pbm->teardown_msi_irq(irq, pdev);
}
+
+static struct msi_chip sparc_msi_chip = {
+ .setup_irq = sparc_setup_msi_irq,
+ .teardown_irq = sparc_teardown_msi_irq,
+};
+
+struct msi_chip *arch_find_msi_chip(struct pci_dev *dev)
+{
+ return &sparc_msi_chip;
+}
#endif /* !(CONFIG_PCI_MSI) */
static void ali_sound_dma_hack(struct pci_dev *pdev, int set_bit)
--
1.7.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists