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: Prakash Gupta <guptap@codeaurora.org>
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
This commit is contained in:
Prakash Gupta 2019-10-09 17:12:48 +05:30 • committed by Isaac J. Manjarres
commit eda5e26ad1

View file

@ -130,7 +130,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);