| From | Paul Gortmaker <> | Subject | [v2.6.34-stable 091/165] iommu/amd: Fix wrong shift direction | Date | Wed, 15 Aug 2012 15:47:15 -0400 |
| |
From: Joerg Roedel <joerg.roedel@amd.com>
------------------- This is a commit scheduled for the next v2.6.34 longterm release. http://git.kernel.org/?p=linux/kernel/git/paulg/longterm-queue-2.6.34.git If you see a problem with using this for longterm, please comment. -------------------
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 <joerg.roedel@amd.com> [PG: drivers/iommu/ was arch/x86/kernel/ in 2.6.34 context] Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> --- arch/x86/kernel/amd_iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c index 1aae617..74ce61d 100644 --- a/arch/x86/kernel/amd_iommu.c +++ b/arch/x86/kernel/amd_iommu.c @@ -1046,7 +1046,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); -- 1.7.12.rc2
|