aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/platforms/cell/iommu.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/arch/powerpc/platforms/cell/iommu.c b/arch/powerpc/platforms/cell/iommu.c
index 187a723eafcd..7a861cb960d2 100644
--- a/arch/powerpc/platforms/cell/iommu.c
+++ b/arch/powerpc/platforms/cell/iommu.c
@@ -348,9 +348,8 @@ static unsigned long *cell_iommu_alloc_ptab(struct cbe_iommu *iommu,
348 ptab = page_address(page); 348 ptab = page_address(page);
349 memset(ptab, 0, ptab_size); 349 memset(ptab, 0, ptab_size);
350 350
351 /* number of pages needed for a page table */ 351 /* number of 4K pages needed for a page table */
352 n_pte_pages = (pages_per_segment * 352 n_pte_pages = (pages_per_segment * sizeof(unsigned long)) >> 12;
353 sizeof(unsigned long)) >> IOMMU_PAGE_SHIFT;
354 353
355 pr_debug("%s: iommu[%d]: stab at %p, ptab at %p, n_pte_pages: %lu\n", 354 pr_debug("%s: iommu[%d]: stab at %p, ptab at %p, n_pte_pages: %lu\n",
356 __FUNCTION__, iommu->nid, iommu->stab, ptab, 355 __FUNCTION__, iommu->nid, iommu->stab, ptab,
@@ -377,8 +376,8 @@ static unsigned long *cell_iommu_alloc_ptab(struct cbe_iommu *iommu,
377 pr_debug("\toverlap at %d, skipping\n", i); 376 pr_debug("\toverlap at %d, skipping\n", i);
378 continue; 377 continue;
379 } 378 }
380 iommu->stab[i] = reg | (__pa(ptab) + n_pte_pages * 379 iommu->stab[i] = reg | (__pa(ptab) + (n_pte_pages << 12) *
381 IOMMU_PAGE_SIZE * (i - start_seg)); 380 (i - start_seg));
382 pr_debug("\t[%d] 0x%016lx\n", i, iommu->stab[i]); 381 pr_debug("\t[%d] 0x%016lx\n", i, iommu->stab[i]);
383 } 382 }
384 383