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 19/31] Remove ia64 from pcifront.c support.

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 19/31] Remove ia64 from pcifront.c support.
From: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Date: Thu, 5 Nov 2009 16:33:27 -0500
Cc: Jeremy Fitzhardinge <jeremy@xxxxxxxx>, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Delivery-date: Thu, 05 Nov 2009 13:51:49 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1257456819-782-19-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: <1257456819-782-1-git-send-email-konrad.wilk@xxxxxxxxxx> <1257456819-782-2-git-send-email-konrad.wilk@xxxxxxxxxx> <1257456819-782-3-git-send-email-konrad.wilk@xxxxxxxxxx> <1257456819-782-4-git-send-email-konrad.wilk@xxxxxxxxxx> <1257456819-782-5-git-send-email-konrad.wilk@xxxxxxxxxx> <1257456819-782-6-git-send-email-konrad.wilk@xxxxxxxxxx> <1257456819-782-7-git-send-email-konrad.wilk@xxxxxxxxxx> <1257456819-782-8-git-send-email-konrad.wilk@xxxxxxxxxx> <1257456819-782-9-git-send-email-konrad.wilk@xxxxxxxxxx> <1257456819-782-10-git-send-email-konrad.wilk@xxxxxxxxxx> <1257456819-782-11-git-send-email-konrad.wilk@xxxxxxxxxx> <1257456819-782-12-git-send-email-konrad.wilk@xxxxxxxxxx> <1257456819-782-13-git-send-email-konrad.wilk@xxxxxxxxxx> <1257456819-782-14-git-send-email-konrad.wilk@xxxxxxxxxx> <1257456819-782-15-git-send-email-konrad.wilk@xxxxxxxxxx> <1257456819-782-16-git-send-email-konrad.wilk@xxxxxxxxxx> <1257456819-782-17-git-send-email-konrad.wilk@xxxxxxxxxx> <1257456819-782-18-git-send-email-konrad.wilk@xxxxxxxxxx> <1257456819-782-19-git-send-email-konrad.wilk@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
The ia64 support of PCI frontend requires changes in the arch/ia64/pci/pci.c
which are currently not present. Will revisit once those are present.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
---
 drivers/xen/pcifront/pci_op.c   |  115 ---------------------------------------
 drivers/xen/pcifront/pcifront.h |   29 ----------
 2 files changed, 0 insertions(+), 144 deletions(-)

diff --git a/drivers/xen/pcifront/pci_op.c b/drivers/xen/pcifront/pci_op.c
index e270798..e2bea86 100644
--- a/drivers/xen/pcifront/pci_op.c
+++ b/drivers/xen/pcifront/pci_op.c
@@ -16,121 +16,6 @@
 static int verbose_request = 0;
 module_param(verbose_request, int, 0644);
 
-#ifdef __ia64__
-static void pcifront_init_sd(struct pcifront_sd *sd,
-                            unsigned int domain, unsigned int bus,
-                            struct pcifront_device *pdev)
-{
-       int err, i, j, k, len, root_num, res_count;
-       struct acpi_resource res;
-       unsigned int d, b, byte;
-       unsigned long magic;
-       char str[64], tmp[3];
-       unsigned char *buf, *bufp;
-       u8 *ptr;
-
-       memset(sd, 0, sizeof(*sd));
-
-       sd->segment = domain;
-       sd->node = -1;  /* Revisit for NUMA */
-       sd->platform_data = pdev;
-
-       /* Look for resources for this controller in xenbus. */
-       err = xenbus_scanf(XBT_NIL, pdev->xdev->otherend, "root_num",
-                          "%d", &root_num);
-       if (err != 1)
-               return;
-
-       for (i = 0; i < root_num; i++) {
-               len = snprintf(str, sizeof(str), "root-%d", i);
-               if (unlikely(len >= (sizeof(str) - 1)))
-                       return;
-
-               err = xenbus_scanf(XBT_NIL, pdev->xdev->otherend,
-                                  str, "%x:%x", &d, &b);
-               if (err != 2)
-                       return;
-
-               if (d == domain && b == bus)
-                       break;
-       }
-
-       if (i == root_num)
-               return;
-
-       len = snprintf(str, sizeof(str), "root-resource-magic");
-
-       err = xenbus_scanf(XBT_NIL, pdev->xdev->otherend,
-                          str, "%lx", &magic);
-
-       if (err != 1)
-               return; /* No resources, nothing to do */
-
-       if (magic != (sizeof(res) * 2) + 1) {
-               printk(KERN_WARNING "pcifront: resource magic mismatch\n");
-               return;
-       }
-
-       len = snprintf(str, sizeof(str), "root-%d-resources", i);
-       if (unlikely(len >= (sizeof(str) - 1)))
-               return;
-
-       err = xenbus_scanf(XBT_NIL, pdev->xdev->otherend,
-                          str, "%d", &res_count);
-
-       if (err != 1)
-               return; /* No resources, nothing to do */
-
-       sd->window = kzalloc(sizeof(*sd->window) * res_count, GFP_KERNEL);
-       if (!sd->window)
-               return;
-
-       /* magic is also the size of the byte stream in xenbus */
-       buf = kmalloc(magic, GFP_KERNEL);
-       if (!buf) {
-               kfree(sd->window);
-               sd->window = NULL;
-               return;
-       }
-
-       /* Read the resources out of xenbus */
-       for (j = 0; j < res_count; j++) {
-               memset(&res, 0, sizeof(res));
-               memset(buf, 0, magic);
-
-               len = snprintf(str, sizeof(str), "root-%d-resource-%d", i, j);
-               if (unlikely(len >= (sizeof(str) - 1)))
-                       return;
-
-               err = xenbus_scanf(XBT_NIL, pdev->xdev->otherend, str,
-                                  "%s", buf);
-               if (err != 1) {
-                       printk(KERN_WARNING "pcifront: error reading "
-                              "resource %d on bus %04x:%02x\n",
-                              j, domain, bus);
-                       continue;
-               }
-
-               bufp = buf;
-               ptr = (u8 *)&res;
-               memset(tmp, 0, sizeof(tmp));
-
-               /* Copy ASCII byte stream into structure */
-               for (k = 0; k < magic - 1; k += 2) {
-                       memcpy(tmp, bufp, 2);
-                       bufp += 2;
-
-                       sscanf(tmp, "%02x", &byte);
-                       *ptr = byte;
-                       ptr++;
-               }
-
-               xen_add_resource(sd, domain, bus, &res);
-               sd->windows++;
-       }
-       kfree(buf);
-}
-#endif
 
 static int errno_to_pcibios_err(int errno)
 {
diff --git a/drivers/xen/pcifront/pcifront.h b/drivers/xen/pcifront/pcifront.h
index 3c6a799..4b34619 100644
--- a/drivers/xen/pcifront/pcifront.h
+++ b/drivers/xen/pcifront/pcifront.h
@@ -40,8 +40,6 @@ struct pcifront_device {
 
 };
 
-#ifndef __ia64__
-
 struct pcifront_sd {
        int domain;
        struct pcifront_device *pdev;
@@ -61,37 +59,10 @@ static inline void pcifront_init_sd(struct pcifront_sd *sd,
        sd->pdev = pdev;
 }
 
-
 static inline void pcifront_setup_root_resources(struct pci_bus *bus,
                                                 struct pcifront_sd *sd)
 {
 }
-
-#else /* __ia64__ */
-
-#include <linux/acpi.h>
-#include <asm/pci.h>
-#define pcifront_sd pci_controller
-
-extern void xen_add_resource(struct pci_controller *, unsigned int,
-                            unsigned int, struct acpi_resource *);
-extern void xen_pcibios_setup_root_windows(struct pci_bus *,
-                                          struct pci_controller *);
-
-static inline struct pcifront_device *
-pcifront_get_pdev(struct pcifront_sd *sd)
-{
-       return (struct pcifront_device *)sd->platform_data;
-}
-
-static inline void pcifront_setup_root_resources(struct pci_bus *bus,
-                                                struct pcifront_sd *sd)
-{
-       xen_pcibios_setup_root_windows(bus, sd);
-}
-
-#endif /* __ia64__ */
-
 extern struct rw_semaphore pci_bus_sem;
 
 int pcifront_scan_root(struct pcifront_device *pdev,
-- 
1.6.2.5


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

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