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

Commit b9bc10e9 authored by Jordan Crouse's avatar Jordan Crouse
Browse files

iommu: io-pgtable-arm: Fix unmap optimization for pagetable boundaries



The last level optimization for __arm_lpae_unmap assumes that
consecutive blocks of 2MB addresses are located in the same
1GB mapping but this isn't always true - if the address spans
a 1GB boundary the next iova is in a different pagetable.

Only perform the optimization for the current pagetable entry and
then kick it back for the loop in arm_lpae_unmap to try again
with the updated iova.  All this means that __arm_lpae_unmap may
not unmap all of the size that it was given. This is okay assuming
at least something was unmapped so don't jump out of the loop
in arm_lpae_unmap until the child function returns 0 or the entire
block is freed, whichever comes first.

CRs-Fixed: 867143
Change-Id: Ic0dedbad407d60365a95afdaf03ec3b91f53960d
Signed-off-by: default avatarJordan Crouse <jcrouse@codeaurora.org>
parent cdecac51
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