[IA64] SGI Altix : fix bug in sn_io_late_init()
[profile/ivi/kernel-x86-ivi.git] / arch / ia64 / sn / kernel / io_common.c
index d48bcd8..f3250c1 100644 (file)
@@ -364,7 +364,7 @@ void sn_bus_store_sysdata(struct pci_dev *dev)
 
        element = kzalloc(sizeof(struct sysdata_el), GFP_KERNEL);
        if (!element) {
-               dev_dbg(dev, "%s: out of memory!\n", __FUNCTION__);
+               dev_dbg(&dev->dev, "%s: out of memory!\n", __FUNCTION__);
                return;
        }
        element->sysdata = SN_PCIDEV_INFO(dev);
@@ -391,7 +391,7 @@ void sn_bus_free_sysdata(void)
  * hubdev_init_node() - Creates the HUB data structure and link them to it's
  *                     own NODE specific data area.
  */
-void hubdev_init_node(nodepda_t * npda, cnodeid_t node)
+void __init hubdev_init_node(nodepda_t * npda, cnodeid_t node)
 {
        struct hubdev_info *hubdev_info;
        int size;
@@ -479,7 +479,7 @@ sn_io_early_init(void)
        }
 
        /*
-        * prime sn_pci_provider[].  Individial provider init routines will
+        * prime sn_pci_provider[].  Individual provider init routines will
         * override their respective default entries.
         */
 
@@ -545,19 +545,18 @@ sn_io_late_init(void)
                nasid = NASID_GET(bussoft->bs_base);
                cnode = nasid_to_cnodeid(nasid);
                if ((bussoft->bs_asic_type == PCIIO_ASIC_TYPE_TIOCP) ||
-                   (bussoft->bs_asic_type == PCIIO_ASIC_TYPE_TIOCE)) {
-                       /* TIO PCI Bridge: find nearest node with CPUs */
+                   (bussoft->bs_asic_type == PCIIO_ASIC_TYPE_TIOCE) ||
+                   (bussoft->bs_asic_type == PCIIO_ASIC_TYPE_PIC)) {
+                       /* PCI Bridge: find nearest node with CPUs */
                        int e = sn_hwperf_get_nearest_node(cnode, NULL,
                                                           &near_cnode);
                        if (e < 0) {
                                near_cnode = (cnodeid_t)-1; /* use any node */
-                               printk(KERN_WARNING "pcibr_bus_fixup: failed "
-                                      "to find near node with CPUs to TIO "
+                               printk(KERN_WARNING "sn_io_late_init: failed "
+                                      "to find near node with CPUs for "
                                       "node %d, err=%d\n", cnode, e);
                        }
                        PCI_CONTROLLER(bus)->node = near_cnode;
-               } else if (bussoft->bs_asic_type == PCIIO_ASIC_TYPE_PIC) {
-                       PCI_CONTROLLER(bus)->node = cnode;
                }
        }