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

Commit 7915cb5b authored by Prakash Gupta's avatar Prakash Gupta
Browse files

iommu: dma-mapping-fast: fix iova alloc wrap



In case of iova_alloc bitmap search wrap, we erroneously update the
previous_next_start as 0, this causes stale tlb logic not detect wrap and
stale TLB entry issues. Fix the same.

Change-Id: Ic8c96e98abc91520f222a7dbe5024814dabd5042
Signed-off-by: default avatarPrakash Gupta <guptap@codeaurora.org>
parent 692654ff
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -181,7 +181,6 @@ static dma_addr_t __fast_smmu_alloc_iova(struct dma_fast_smmu_mapping *mapping,
		nbits, align);
	if (unlikely(bit > mapping->num_4k_pages)) {
		/* try wrapping */
		mapping->next_start = 0; /* TODO: SHOULD I REALLY DO THIS?!? */
		bit = bitmap_find_next_zero_area(
			mapping->bitmap, mapping->num_4k_pages, 0, nbits,
			align);