[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 19/31] Remove ia64 from pcifront.c support.



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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.