Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fcd0861d authored by Joerg Roedel's avatar Joerg Roedel
Browse files

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: default avatarJoerg Roedel <joerg.roedel@amd.com>
parent e33acde9
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -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);