WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH 1/6] Revert "In xen_create_msi_irq, extract the domai

To: xen-devel@xxxxxxxxxxxxxxxxxxx, Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Subject: [Xen-devel] [PATCH 1/6] Revert "In xen_create_msi_irq, extract the domain id of the MSI device."
From: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Date: Wed, 9 Dec 2009 11:29:28 -0500
Cc: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Delivery-date: Wed, 09 Dec 2009 08:38:42 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1260376173-16973-1-git-send-email-konrad.wilk@xxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1260376173-16973-1-git-send-email-konrad.wilk@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
This reverts commit 661692690f8cf5a5ceccec1f4d221ec2381974

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 9c56d60..f8bbf4c 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"
 
 /*
@@ -627,43 +626,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, int pirq_override)
@@ -675,12 +637,6 @@ int xen_create_msi_irq(struct pci_dev *dev, struct 
msi_desc *msidesc,
        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.5


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel