iommu/io-pgtable-arm: Use optimized unmap path properly
The original intention was to free consecutive third-level page table
entries via a single call to memset, and issue a single cache flush.
Consider the case of unmapping 4M, using 4K iommu page mappings, with
an initial iova of 1M.
1M to 2M:
The optimized logic would not run, since 'remaining < SZ_2M' is false.
This causes a cache flush to be issued for every 4K page.
2M to 4M:
This is a standard block size.
4M to 5M:
The optimized logic detects that 'remaining < SZ_2M' is true, and
runs properly.
Fix the logic to consider the first case.
Change-Id: I441b414e2d60e78958c2b26864b08b7b89edfa86
Signed-off-by:
Patrick Daly <pdaly@codeaurora.org>
Loading
Please register or sign in to comment