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

Commit 313fcc8f authored by Mitchel Humpherys's avatar Mitchel Humpherys Committed by Matt Wagantall
Browse files

iommu: io-pgtable-arm: use correct mask during iova_to_phys



In ARMv8, the output address from a page table walk is obtained by
combining some bits from the physical address in the leaf page table
entry with some bits from the input virtual address.  The number of bits
that should be taken from the virtual address varies based on the lookup
level and descriptor type.  However, we're currently always using
data->pg_shift bits, which is a constant.

Conveniently there's already a macro to compute the number of bits we
want (ARM_LPAE_LVL_SHIFT).  Use this macro instead of data->pg_shift to
build the virtual address mask.

Change-Id: Id7f8aa2c553cc004e5d895d05c9226a896d22ce6
Signed-off-by: default avatarMitchel Humpherys <mitchelh@codeaurora.org>
parent 9dd52c87
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