Merge branch 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[pandora-kernel.git] / drivers / parisc / ccio-dma.c
index 5d610cb..a6b4a5a 100644 (file)
@@ -70,7 +70,6 @@
 #undef CCIO_COLLECT_STATS
 #endif
 
-#include <linux/proc_fs.h>
 #include <asm/runway.h>                /* for proc_runway_root */
 
 #ifdef DEBUG_CCIO_INIT
@@ -1134,7 +1133,7 @@ static const struct file_operations ccio_proc_bitmap_fops = {
        .llseek = seq_lseek,
        .release = single_release,
 };
-#endif
+#endif /* CONFIG_PROC_FS */
 
 /**
  * ccio_find_ioc - Find the ioc in the ioc_list
@@ -1267,7 +1266,7 @@ ccio_ioc_init(struct ioc *ioc)
        ** Hot-Plug/Removal of PCI cards. (aka PCI OLARD).
        */
 
-       iova_space_size = (u32) (num_physpages / count_parisc_driver(&ccio_driver));
+       iova_space_size = (u32) (totalram_pages / count_parisc_driver(&ccio_driver));
 
        /* limit IOVA space size to 1MB-1GB */
 
@@ -1306,7 +1305,7 @@ ccio_ioc_init(struct ioc *ioc)
 
        DBG_INIT("%s() hpa 0x%p mem %luMB IOV %dMB (%d bits)\n",
                        __func__, ioc->ioc_regs,
-                       (unsigned long) num_physpages >> (20 - PAGE_SHIFT),
+                       (unsigned long) totalram_pages >> (20 - PAGE_SHIFT),
                        iova_space_size>>20,
                        iov_order + PAGE_SHIFT);
 
@@ -1568,14 +1567,15 @@ static int __init ccio_probe(struct parisc_device *dev)
        /* if this fails, no I/O cards will work, so may as well bug */
        BUG_ON(dev->dev.platform_data == NULL);
        HBA_DATA(dev->dev.platform_data)->iommu = ioc;
-       
+
+#ifdef CONFIG_PROC_FS
        if (ioc_count == 0) {
                proc_create(MODULE_NAME, 0, proc_runway_root,
                            &ccio_proc_info_fops);
                proc_create(MODULE_NAME"-bitmap", 0, proc_runway_root,
                            &ccio_proc_bitmap_fops);
        }
-
+#endif
        ioc_count++;
 
        parisc_has_iommu();