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

Commit 3b264578 authored by Patrick Daly's avatar Patrick Daly
Browse files

iommu: arm-smmu: Fix shift of integer by more than 32



UBSAN detected an issue where an integer can be shifted by more than 32.
Use the correct type for this operation.

Change-Id: I3aad0d73374c23930049cd6a9de337268d659e0f
Signed-off-by: default avatarPatrick Daly <pdaly@codeaurora.org>
parent 190f44f1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -78,7 +78,7 @@

/* Calculate the block/page mapping size at level l for pagetable in d. */
#define ARM_LPAE_BLOCK_SIZE(l,d)					\
	(1 << (ilog2(sizeof(arm_lpae_iopte)) +				\
	(1ULL << (ilog2(sizeof(arm_lpae_iopte)) +			\
		((ARM_LPAE_MAX_LEVELS - (l)) * (d)->bits_per_level)))

/* Page table bits */