From: Joerg Roedel Date: Tue, 11 Oct 2011 15:41:32 +0000 (+0200) Subject: iommu/amd: Fix wrong shift direction X-Git-Tag: v2.6.39-400.9.0~823^2~304 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=12c7fd9231e02824147f763f47b1c4d69d559ae6;p=users%2Fjedix%2Flinux-maple.git iommu/amd: Fix wrong shift direction commit fcd0861db1cf4e6ed99f60a815b7b72c2ed36ea4 upstream. The shift direction was wrong because the function takes a page number and i is the address is the loop. Signed-off-by: Joerg Roedel Signed-off-by: Greg Kroah-Hartman --- diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c index d3d9d50d93a54..bfd75ff5d5bda 100644 --- a/arch/x86/kernel/amd_iommu.c +++ b/arch/x86/kernel/amd_iommu.c @@ -1203,7 +1203,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);