Merge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-nmw
[pandora-kernel.git] / arch / ia64 / sn / pci / tioca_provider.c
index d798dd4..7916512 100644 (file)
@@ -88,7 +88,7 @@ tioca_gart_init(struct tioca_kernel *tioca_kern)
                break;
        default:
                printk(KERN_ERR "%s:  Invalid CA_APERATURE_SIZE "
-                      "0x%lx\n", __FUNCTION__, (ulong) CA_APERATURE_SIZE);
+                      "0x%lx\n", __func__, (ulong) CA_APERATURE_SIZE);
                return -1;
        }
 
@@ -124,7 +124,7 @@ tioca_gart_init(struct tioca_kernel *tioca_kern)
        if (!tmp) {
                printk(KERN_ERR "%s:  Could not allocate "
                       "%lu bytes (order %d) for GART\n",
-                      __FUNCTION__,
+                      __func__,
                       tioca_kern->ca_gart_size,
                       get_order(tioca_kern->ca_gart_size));
                return -ENOMEM;
@@ -341,7 +341,7 @@ tioca_dma_d48(struct pci_dev *pdev, u64 paddr)
 
        if (node_upper > 64) {
                printk(KERN_ERR "%s:  coretalk addr 0x%p node id out "
-                      "of range\n", __FUNCTION__, (void *)ct_addr);
+                      "of range\n", __func__, (void *)ct_addr);
                return 0;
        }
 
@@ -349,7 +349,7 @@ tioca_dma_d48(struct pci_dev *pdev, u64 paddr)
        if (node_upper != (agp_dma_extn >> CA_AGP_DMA_NODE_ID_SHFT)) {
                printk(KERN_ERR "%s:  coretalk upper node (%u) "
                       "mismatch with ca_agp_dma_addr_extn (%lu)\n",
-                      __FUNCTION__,
+                      __func__,
                       node_upper, (agp_dma_extn >> CA_AGP_DMA_NODE_ID_SHFT));
                return 0;
        }
@@ -420,8 +420,10 @@ tioca_dma_mapped(struct pci_dev *pdev, u64 paddr, size_t req_size)
                entry = find_next_zero_bit(map, mapsize, last_entry);
        }
 
-       if (entry > mapsize)
+       if (entry > mapsize) {
+               kfree(ca_dmamap);
                goto map_return;
+       }
 
        for (i = 0; i < entries; i++)
                set_bit(entry + i, map);
@@ -597,7 +599,7 @@ tioca_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *cont
        if (is_shub1() && sn_sal_rev() < 0x0406) {
                printk
                    (KERN_ERR "%s:  SGI prom rev 4.06 or greater required "
-                    "for tioca support\n", __FUNCTION__);
+                    "for tioca support\n", __func__);
                return NULL;
        }
 
@@ -651,9 +653,11 @@ tioca_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *cont
                printk(KERN_WARNING
                       "%s:  Unable to get irq %d.  "
                       "Error interrupts won't be routed for TIOCA bus %d\n",
-                      __FUNCTION__, SGI_TIOCA_ERROR,
+                      __func__, SGI_TIOCA_ERROR,
                       (int)tioca_common->ca_common.bs_persist_busnum);
 
+       sn_set_err_irq_affinity(SGI_TIOCA_ERROR);
+
        /* Setup locality information */
        controller->node = tioca_kern->ca_closest_node;
        return tioca_common;