aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoerg Roedel <joerg.roedel@amd.com>2011-10-11 11:41:32 -0400
committerJoerg Roedel <joerg.roedel@amd.com>2011-10-11 11:41:32 -0400
commitfcd0861db1cf4e6ed99f60a815b7b72c2ed36ea4 (patch)
treeeda4a79003476bd19a819dba3c12d5bc9b3d574d
parente33acde91140f1809952d1c135c36feb66a51887 (diff)
iommu/amd: Fix wrong shift direction
The shift direction was wrong because the function takes a page number and i is the address is the loop. Cc: stable@kernel.org Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
-rw-r--r--drivers/iommu/amd_iommu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index 0e4227f457af..cc79045bc527 100644
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_iommu.c
@@ -1283,7 +1283,7 @@ static int alloc_new_range(struct dma_ops_domain *dma_dom,
1283 if (!pte || !IOMMU_PTE_PRESENT(*pte)) 1283 if (!pte || !IOMMU_PTE_PRESENT(*pte))
1284 continue; 1284 continue;
1285 1285
1286 dma_ops_reserve_addresses(dma_dom, i << PAGE_SHIFT, 1); 1286 dma_ops_reserve_addresses(dma_dom, i >> PAGE_SHIFT, 1);
1287 } 1287 }
1288 1288
1289 update_domain(&dma_dom->domain); 1289 update_domain(&dma_dom->domain);