]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/sparc64/kernel/pci_sun4v.c
of_platform_driver noise on sparce
[linux-2.6-omap-h63xx.git] / arch / sparc64 / kernel / pci_sun4v.c
index e86c73ec167b3ff66d887204f41630d71e7f2d08..4b27b0e10ce78baa287691d04c695dfcce293751 100644 (file)
@@ -384,7 +384,7 @@ static int dma_4v_map_sg(struct device *dev, struct scatterlist *sglist,
                }
                /* Allocate iommu entries for that segment */
                paddr = (unsigned long) SG_ENT_PHYS_ADDRESS(s);
-               npages = iommu_num_pages(paddr, slen);
+               npages = iommu_num_pages(paddr, slen, IO_PAGE_SIZE);
                entry = iommu_range_alloc(dev, iommu, npages, &handle);
 
                /* Handle failure */
@@ -461,7 +461,8 @@ iommu_map_failed:
                        unsigned long vaddr, npages;
 
                        vaddr = s->dma_address & IO_PAGE_MASK;
-                       npages = iommu_num_pages(s->dma_address, s->dma_length);
+                       npages = iommu_num_pages(s->dma_address, s->dma_length,
+                                                IO_PAGE_SIZE);
                        iommu_range_free(iommu, vaddr, npages);
                        /* XXX demap? XXX */
                        s->dma_address = DMA_ERROR_CODE;
@@ -500,7 +501,7 @@ static void dma_4v_unmap_sg(struct device *dev, struct scatterlist *sglist,
 
                if (!len)
                        break;
-               npages = iommu_num_pages(dma_handle, len);
+               npages = iommu_num_pages(dma_handle, len, IO_PAGE_SIZE);
                iommu_range_free(iommu, dma_handle, npages);
 
                entry = ((dma_handle - iommu->page_table_map_base) >> IO_PAGE_SHIFT);
@@ -928,7 +929,7 @@ static int __init pci_sun4v_pbm_init(struct pci_pbm_info *pbm,
        return 0;
 }
 
-static int __devinit pci_sun4v_probe(struct of_device *op,
+static int __init pci_sun4v_probe(struct of_device *op,
                                     const struct of_device_id *match)
 {
        const struct linux_prom64_registers *regs;