Skip to content

Commit fcd0861

Browse files
committed
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: [email protected] Signed-off-by: Joerg Roedel <[email protected]>
1 parent e33acde commit fcd0861

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/iommu/amd_iommu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1283,7 +1283,7 @@ static int alloc_new_range(struct dma_ops_domain *dma_dom,
12831283
if (!pte || !IOMMU_PTE_PRESENT(*pte))
12841284
continue;
12851285

1286-
dma_ops_reserve_addresses(dma_dom, i << PAGE_SHIFT, 1);
1286+
dma_ops_reserve_addresses(dma_dom, i >> PAGE_SHIFT, 1);
12871287
}
12881288

12891289
update_domain(&dma_dom->domain);

0 commit comments

Comments
 (0)