]> xenbits.xensource.com Git - linux-pvops.git/commitdiff
iommu/amd: Fix wrong shift direction
authorJoerg Roedel <joerg.roedel@amd.com>
Tue, 11 Oct 2011 15:41:32 +0000 (17:41 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 7 Nov 2011 20:32:34 +0000 (12:32 -0800)
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/x86/kernel/amd_iommu.c

index 7cd33f75a69c4c44360528bc44b00418cb1f29de..3a44b75670307a8fcf08d8de65de9859eb036fd4 100644 (file)
@@ -842,7 +842,7 @@ static int alloc_new_range(struct amd_iommu *iommu,
                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);