From: Joerg Roedel Date: Tue, 11 Oct 2011 15:41:32 +0000 (+0200) Subject: iommu/amd: Fix wrong shift direction X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=fcd0861db1cf4e6ed99f60a815b7b72c2ed36ea4;p=mv-sheeva.git 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 --- diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c index 0e4227f457a..cc79045bc52 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, if (!pte || !IOMMU_PTE_PRESENT(*pte)) continue; - dma_ops_reserve_addresses(dma_dom, i << PAGE_SHIFT, 1); + dma_ops_reserve_addresses(dma_dom, i >> PAGE_SHIFT, 1); } update_domain(&dma_dom->domain);