mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-28 23:24:50 +00:00
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: stable@kernel.org Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
This commit is contained in:
parent
e33acde911
commit
fcd0861db1
1 changed files with 1 additions and 1 deletions
|
@ -1283,7 +1283,7 @@ static int alloc_new_range(struct dma_ops_domain *dma_dom,
|
||||||
if (!pte || !IOMMU_PTE_PRESENT(*pte))
|
if (!pte || !IOMMU_PTE_PRESENT(*pte))
|
||||||
continue;
|
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);
|
update_domain(&dma_dom->domain);
|
||||||
|
|
Loading…
Reference in a new issue