This reverts commit 661692690f8cf5a5ceccec1f4d221ec238197448.
Conflicts:
drivers/xen/events.c
I did not remove the domid attribute from the structs as they
are going to be used in the subsequent patches.
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
---
drivers/xen/events.c | 44 --------------------------------------------
1 files changed, 0 insertions(+), 44 deletions(-)
diff --git a/drivers/xen/events.c b/drivers/xen/events.c
index be24a25..2ede0c8 100644
--- a/drivers/xen/events.c
+++ b/drivers/xen/events.c
@@ -45,7 +45,6 @@
#include <xen/interface/xen.h>
#include <xen/interface/event_channel.h>
-#include <xen/xenbus.h>
#include "../pci/msi.h"
/*
@@ -613,43 +612,6 @@ out:
spin_unlock(&irq_mapping_update_lock);
return rc;
}
-#define XS_PCI_SEARCH "/local/domain/0/backend/pci/"
-#define XS_PCI_SEARCH_LEN 28
-
-static int get_domid_for_dev(char *nodename, char *path, char *val, void *data)
-{
- struct pci_dev *dev = (struct pci_dev *)data;
-
- /* We are looking for:
- * CB inv[/local/domain/0/backend/pci/3/0/dev-1]=0000:00:14.5 */
-
- if (!dev || !pci_name(dev))
- return -ENODEV;
-
- if (strncmp(nodename, XS_PCI_SEARCH, XS_PCI_SEARCH_LEN) == 0)
- {
- if (strncmp(path, "dev", 3) == 0) {
- char *name = NULL;
- unsigned int domid;
-
- /* The val contains: 0000:00:14.5 */
- if (strcmp(val, pci_name(dev)) != 0)
- return 0;
-
- /* From here on, extract the Domain ID */
- name = strstr(nodename, "pci/");
- if (!name)
- return 0;
-
- if (sscanf(name, "pci/%u", &domid) != 1)
- return 0;
-
- dev_dbg(&dev->dev,"Assigned to domain %u.\n", domid);
- return domid;
- }
- }
- return 0;
-}
int xen_create_msi_irq(struct pci_dev *dev, struct msi_desc *msidesc, int type)
{
@@ -660,12 +622,6 @@ int xen_create_msi_irq(struct pci_dev *dev, struct
msi_desc *msidesc, int type)
int pos;
u32 table_offset, bir;
- /* Walk the XenStore keys to see if the device is assigned to any
- * domain. If so, extract the domain id. */
- domid = rc = xenbus_walk( "/local/domain/0", get_domid_for_dev, dev);
- if (rc < 0)
- domid = DOMID_SELF;
-
memset(&map_irq, 0, sizeof(map_irq));
map_irq.domid = domid;
map_irq.type = MAP_PIRQ_TYPE_MSI;
--
1.6.2.2
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|