summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorIan Campbell <Ian.Campbell@citrix.com>2011-02-18 17:06:55 +0000
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2011-03-10 14:44:45 -0500
commit71eef7d1e3d9df760897fdd2cad6949a8bcf1620 (patch)
treeb9c2a91248e58618eada7e120023fb641dcb719b /drivers
parentca1d8fe9521fb67c95cfa736c08f4bbbc282b5bd (diff)
downloadlinux-71eef7d1e3d9df760897fdd2cad6949a8bcf1620.tar.gz
linux-71eef7d1e3d9df760897fdd2cad6949a8bcf1620.tar.bz2
linux-71eef7d1e3d9df760897fdd2cad6949a8bcf1620.zip
xen: events: remove dom0 specific xen_create_msi_irq
The function name does not distinguish it from xen_allocate_pirq_msi (which operates on domU and pvhvm domains rather than dom0). Hoist domain 0 specific functionality up into the only caller leaving functionality common to all guest types in xen_bind_pirq_msi_to_irq. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/xen/events.c41
1 files changed, 0 insertions, 41 deletions
diff --git a/drivers/xen/events.c b/drivers/xen/events.c
index 34469489087b..6befe6227159 100644
--- a/drivers/xen/events.c
+++ b/drivers/xen/events.c
@@ -644,9 +644,6 @@ out:
}
#ifdef CONFIG_PCI_MSI
-#include <linux/msi.h>
-#include "../pci/msi.h"
-
int xen_allocate_pirq_msi(struct pci_dev *dev, struct msi_desc *msidesc)
{
int rc;
@@ -688,44 +685,6 @@ error_irq:
xen_free_irq(irq);
return -1;
}
-
-int xen_create_msi_irq(struct pci_dev *dev, struct msi_desc *msidesc, int type)
-{
- struct physdev_map_pirq map_irq;
- int rc;
- int pos;
- u32 table_offset, bir;
-
- memset(&map_irq, 0, sizeof(map_irq));
- map_irq.domid = DOMID_SELF;
- map_irq.type = MAP_PIRQ_TYPE_MSI;
- map_irq.index = -1;
- map_irq.pirq = -1;
- map_irq.bus = dev->bus->number;
- map_irq.devfn = dev->devfn;
-
- if (type == PCI_CAP_ID_MSIX) {
- pos = pci_find_capability(dev, PCI_CAP_ID_MSIX);
-
- pci_read_config_dword(dev, msix_table_offset_reg(pos),
- &table_offset);
- bir = (u8)(table_offset & PCI_MSIX_FLAGS_BIRMASK);
-
- map_irq.table_base = pci_resource_start(dev, bir);
- map_irq.entry_nr = msidesc->msi_attrib.entry_nr;
- }
-
- rc = HYPERVISOR_physdev_op(PHYSDEVOP_map_pirq, &map_irq);
- if (rc) {
- dev_warn(&dev->dev, "xen map irq failed %d\n", rc);
- return -1;
- }
-
- return xen_bind_pirq_msi_to_irq(dev, msidesc,
- map_irq.pirq, map_irq.index,
- (type == PCI_CAP_ID_MSIX) ?
- "msi-x" : "msi");
-}
#endif
int xen_destroy_irq(int irq)