Skip to content

Commit

Permalink
iommu/amd: Fix wrong shift direction
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Joerg Roedel committed Oct 11, 2011
1 parent e33acde commit fcd0861
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/iommu/amd_iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit fcd0861

Please sign in to comment.