summaryrefslogtreecommitdiff
path: root/arch/powerpc/kernel/vio.c
diff options
context:
space:
mode:
authorAlistair Popple <alistair@popple.id.au>2013-12-09 18:17:02 +1100
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2013-12-30 14:17:13 +1100
commit3a553170d35d69bea3877bffa508489dfa6f133d (patch)
tree9cb5b53ea4a60e10c9cfe2644f35a9fe4673d050 /arch/powerpc/kernel/vio.c
parente589a4404fa06730355de204d3d136ed9bbc7dea (diff)
powerpc/iommu: Add it_page_shift field to determine iommu page size
This patch adds a it_page_shift field to struct iommu_table and initiliases it to 4K for all platforms. Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel/vio.c')
-rw-r--r--arch/powerpc/kernel/vio.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/vio.c b/arch/powerpc/kernel/vio.c
index 2e89fa350763..170ac24a0106 100644
--- a/arch/powerpc/kernel/vio.c
+++ b/arch/powerpc/kernel/vio.c
@@ -1177,9 +1177,10 @@ static struct iommu_table *vio_build_iommu_table(struct vio_dev *dev)
&tbl->it_index, &offset, &size);
/* TCE table size - measured in tce entries */
- tbl->it_size = size >> IOMMU_PAGE_SHIFT_4K;
+ tbl->it_page_shift = IOMMU_PAGE_SHIFT_4K;
+ tbl->it_size = size >> tbl->it_page_shift;
/* offset for VIO should always be 0 */
- tbl->it_offset = offset >> IOMMU_PAGE_SHIFT_4K;
+ tbl->it_offset = offset >> tbl->it_page_shift;
tbl->it_busno = 0;
tbl->it_type = TCE_VB;
tbl->it_blocksize = 16;