aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/kernel/iommu.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/powerpc/kernel/iommu.c b/arch/powerpc/kernel/iommu.c
index 550a19399bfa..e2cf6320907e 100644
--- a/arch/powerpc/kernel/iommu.c
+++ b/arch/powerpc/kernel/iommu.c
@@ -51,7 +51,7 @@ static int protect4gb = 1;
51 51
52static void __iommu_free(struct iommu_table *, dma_addr_t, unsigned int); 52static void __iommu_free(struct iommu_table *, dma_addr_t, unsigned int);
53 53
54static inline unsigned long iommu_num_pages(unsigned long vaddr, 54static inline unsigned long iommu_nr_pages(unsigned long vaddr,
55 unsigned long slen) 55 unsigned long slen)
56{ 56{
57 unsigned long npages; 57 unsigned long npages;
@@ -325,7 +325,7 @@ int iommu_map_sg(struct device *dev, struct iommu_table *tbl,
325 } 325 }
326 /* Allocate iommu entries for that segment */ 326 /* Allocate iommu entries for that segment */
327 vaddr = (unsigned long) sg_virt(s); 327 vaddr = (unsigned long) sg_virt(s);
328 npages = iommu_num_pages(vaddr, slen); 328 npages = iommu_nr_pages(vaddr, slen);
329 align = 0; 329 align = 0;
330 if (IOMMU_PAGE_SHIFT < PAGE_SHIFT && slen >= PAGE_SIZE && 330 if (IOMMU_PAGE_SHIFT < PAGE_SHIFT && slen >= PAGE_SIZE &&
331 (vaddr & ~PAGE_MASK) == 0) 331 (vaddr & ~PAGE_MASK) == 0)
@@ -418,7 +418,7 @@ int iommu_map_sg(struct device *dev, struct iommu_table *tbl,
418 unsigned long vaddr, npages; 418 unsigned long vaddr, npages;
419 419
420 vaddr = s->dma_address & IOMMU_PAGE_MASK; 420 vaddr = s->dma_address & IOMMU_PAGE_MASK;
421 npages = iommu_num_pages(s->dma_address, s->dma_length); 421 npages = iommu_nr_pages(s->dma_address, s->dma_length);
422 __iommu_free(tbl, vaddr, npages); 422 __iommu_free(tbl, vaddr, npages);
423 s->dma_address = DMA_ERROR_CODE; 423 s->dma_address = DMA_ERROR_CODE;
424 s->dma_length = 0; 424 s->dma_length = 0;
@@ -452,7 +452,7 @@ void iommu_unmap_sg(struct iommu_table *tbl, struct scatterlist *sglist,
452 452
453 if (sg->dma_length == 0) 453 if (sg->dma_length == 0)
454 break; 454 break;
455 npages = iommu_num_pages(dma_handle, sg->dma_length); 455 npages = iommu_nr_pages(dma_handle, sg->dma_length);
456 __iommu_free(tbl, dma_handle, npages); 456 __iommu_free(tbl, dma_handle, npages);
457 sg = sg_next(sg); 457 sg = sg_next(sg);
458 } 458 }
@@ -584,7 +584,7 @@ dma_addr_t iommu_map_single(struct device *dev, struct iommu_table *tbl,
584 BUG_ON(direction == DMA_NONE); 584 BUG_ON(direction == DMA_NONE);
585 585
586 uaddr = (unsigned long)vaddr; 586 uaddr = (unsigned long)vaddr;
587 npages = iommu_num_pages(uaddr, size); 587 npages = iommu_nr_pages(uaddr, size);
588 588
589 if (tbl) { 589 if (tbl) {
590 align = 0; 590 align = 0;
@@ -617,7 +617,7 @@ void iommu_unmap_single(struct iommu_table *tbl, dma_addr_t dma_handle,
617 BUG_ON(direction == DMA_NONE); 617 BUG_ON(direction == DMA_NONE);
618 618
619 if (tbl) { 619 if (tbl) {
620 npages = iommu_num_pages(dma_handle, size); 620 npages = iommu_nr_pages(dma_handle, size);
621 iommu_free(tbl, dma_handle, npages); 621 iommu_free(tbl, dma_handle, npages);
622 } 622 }
623} 623}