[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1414416142-31239-5-git-send-email-wangyijing@huawei.com>
Date: Mon, 27 Oct 2014 21:22:10 +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>, <x86@...nel.org>,
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 04/16] Irq_remapping/MSI: Use MSI controller framework to configure MSI/MSI-X irq
Use MSI controller 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>
---
drivers/iommu/irq_remapping.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/drivers/iommu/irq_remapping.c b/drivers/iommu/irq_remapping.c
index 74a1767..6db1459 100644
--- a/drivers/iommu/irq_remapping.c
+++ b/drivers/iommu/irq_remapping.c
@@ -140,8 +140,8 @@ error:
return ret;
}
-static int irq_remapping_setup_msi_irqs(struct pci_dev *dev,
- int nvec, int type)
+static int irq_remapping_setup_msi_irqs(struct msi_controller *ctrl,
+ struct pci_dev *dev, int nvec, int type)
{
if (type == PCI_CAP_ID_MSI)
return do_setup_msi_irqs(dev, nvec);
@@ -149,6 +149,11 @@ static int irq_remapping_setup_msi_irqs(struct pci_dev *dev,
return do_setup_msix_irqs(dev, nvec);
}
+static struct msi_controller remap_msi_ctrl = {
+ .setup_irqs = irq_remapping_setup_msi_irqs,
+ .teardown_irq = native_teardown_msi_irq,
+};
+
static void eoi_ioapic_pin_remapped(int apic, int pin, int vector)
{
/*
@@ -166,9 +171,9 @@ static void __init irq_remapping_modify_x86_ops(void)
x86_io_apic_ops.set_affinity = set_remapped_irq_affinity;
x86_io_apic_ops.setup_entry = setup_ioapic_remapped_entry;
x86_io_apic_ops.eoi_ioapic_pin = eoi_ioapic_pin_remapped;
- x86_msi.setup_msi_irqs = irq_remapping_setup_msi_irqs;
x86_msi.setup_hpet_msi = setup_hpet_msi_remapped;
x86_msi.compose_msi_msg = compose_remapped_msi_msg;
+ x86_msi_ctrl = &remap_msi_ctrl;
}
static __init int setup_nointremap(char *str)
--
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