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

Commit 238f6c0d authored by Mitchel Humpherys's avatar Mitchel Humpherys
Browse files

iommu: io-pgtable-arm: Correctly unmap the last level



Currently we have an optimization in place for unmapping the last level
of the page tables.  We do this by memset()'ing the entire last level at
once rather than calling unmap on each individual page mapping at the
last level.  For this to work we have to pass in sizes that aren't equal
to any of the supported IOMMU page sizes.  However, our optimization
only applies at the last level.  Unmapping at the other levels still
relies on the fact that unmap is only called with supported IOMMU page
sizes, which means it's currently broken.

Fix this by always calling unmap with an IOMMU page size, unless we're
at the last level of the page tables (i.e. the size to be unmapped is
less than the block size at the second-to-last level), in which case we
can pass in the entire remaining size.

Change-Id: Ie3716002c793af3dca51e0e3363d261f345e9e25
Signed-off-by: default avatarMitchel Humpherys <mitchelh@codeaurora.org>
parent 8a574af1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment