Merge branch 'fixes-2.6.38' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq
[pandora-kernel.git] / arch / powerpc / kernel / iommu.c
index ec94f90..961bb03 100644 (file)
 #define DBG(...)
 
 static int novmerge;
-static int protect4gb = 1;
 
 static void __iommu_free(struct iommu_table *, dma_addr_t, unsigned int);
 
-static int __init setup_protect4gb(char *str)
-{
-       if (strcmp(str, "on") == 0)
-               protect4gb = 1;
-       else if (strcmp(str, "off") == 0)
-               protect4gb = 0;
-
-       return 1;
-}
-
 static int __init setup_iommu(char *str)
 {
        if (!strcmp(str, "novmerge"))
@@ -66,7 +55,6 @@ static int __init setup_iommu(char *str)
        return 1;
 }
 
-__setup("protect4gb=", setup_protect4gb);
 __setup("iommu=", setup_iommu);
 
 static unsigned long iommu_range_alloc(struct device *dev,
@@ -323,8 +311,9 @@ int iommu_map_sg(struct device *dev, struct iommu_table *tbl,
                /* Handle failure */
                if (unlikely(entry == DMA_ERROR_CODE)) {
                        if (printk_ratelimit())
-                               printk(KERN_INFO "iommu_alloc failed, tbl %p vaddr %lx"
-                                      " npages %lx\n", tbl, vaddr, npages);
+                               dev_info(dev, "iommu_alloc failed, tbl %p "
+                                        "vaddr %lx npages %lu\n", tbl, vaddr,
+                                        npages);
                        goto failure;
                }
 
@@ -591,9 +580,9 @@ dma_addr_t iommu_map_page(struct device *dev, struct iommu_table *tbl,
                                         attrs);
                if (dma_handle == DMA_ERROR_CODE) {
                        if (printk_ratelimit())  {
-                               printk(KERN_INFO "iommu_alloc failed, "
-                                               "tbl %p vaddr %p npages %d\n",
-                                               tbl, vaddr, npages);
+                               dev_info(dev, "iommu_alloc failed, tbl %p "
+                                        "vaddr %p npages %d\n", tbl, vaddr,
+                                        npages);
                        }
                } else
                        dma_handle |= (uaddr & ~IOMMU_PAGE_MASK);
@@ -639,7 +628,8 @@ void *iommu_alloc_coherent(struct device *dev, struct iommu_table *tbl,
         * the tce tables.
         */
        if (order >= IOMAP_MAX_ORDER) {
-               printk("iommu_alloc_consistent size too large: 0x%lx\n", size);
+               dev_info(dev, "iommu_alloc_consistent size too large: 0x%lx\n",
+                        size);
                return NULL;
        }