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

Commit 8cb612a2 authored by Patrick Daly's avatar Patrick Daly
Browse files

dma-mapping-fast: Ensure reserved iovas are actually reserved



"mapping->clean_bitmap" holds the iovas which are currently available.
"mapping->bitmap" holds the iovas which will be available after a tlb
invalidate operation.
For an iova to be reserved properly, it needs to be set in both of the
above bitmaps.

Fixes: 07972090 ("dma-mapping-fast: reduce TLBI during map")
Change-Id: I163e63fd1dfc8161733f56d796a9f0a781fd79b1
Signed-off-by: default avatarPatrick Daly <pdaly@codeaurora.org>
parent da2e3647
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -893,6 +893,7 @@ static void fast_smmu_reserve_pci_windows(struct device *dev,
		start = (start - mapping->base) >> FAST_PAGE_SHIFT;
		end = (end - mapping->base) >> FAST_PAGE_SHIFT;
		bitmap_set(mapping->bitmap, start, end - start);
		bitmap_set(mapping->clean_bitmap, start, end - start);
	}
	spin_unlock_irqrestore(&mapping->lock, flags);
}