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

Skip to content
Commit 008a22d3 authored by Isaac J. Manjarres's avatar Isaac J. Manjarres Committed by George Shen
Browse files

iommu/arm-smmu: Fix atomic domain attribute check



When checking if a domain is a atomic or not, the driver code
will take the bitwise AND of the 64-bit domain attributes field
and a bitmask with bit 32 set. This value is then implicitly cast
to an int, which truncates the upper 32 bits--losing the bit
that indicates if the domain is atomic or not--and based on
that int, we determine if the domain is atomic, which will
vacuously be false.

Instead, check if the bitwise AND operation yields a non-zero
value when determining if a domain is atomic or not to prevent
any truncation errors.

Change-Id: I96753035b47b848bc4d1e8029c8f3f46e03f8c67
Signed-off-by: default avatarIsaac J. Manjarres <isaacm@codeaurora.org>
Signed-off-by: default avatarGeorge Shen <sqiao@codeaurora.org>
parent 7db9be17
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