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 17:43:12 -0500
Cc: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Delivery-date: Wed, 09 Dec 2009 14:55:33 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1260398597-11468-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: <4B20131E.4080801@xxxxxxxx> <1260398597-11468-1-git-send-email-konrad.wilk@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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

<Prev in Thread] Current Thread [Next in Thread>