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

Commit 82db33dc authored by Robin Murphy's avatar Robin Murphy Committed by Will Deacon
Browse files

iommu/io-pgtable-arm: Check for v7s-incapable systems



On machines with no 32-bit addressable RAM whatsoever, we shouldn't
even touch the v7s format as it's never going to work.

Fixes: e5fc9753 ("iommu/io-pgtable: Add ARMv7 short descriptor support")
Reported-by: default avatarEric Auger <eric.auger@redhat.com>
Tested-by: default avatarEric Auger <eric.auger@redhat.com>
Signed-off-by: default avatarRobin Murphy <robin.murphy@arm.com>
Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
parent fade1ec0
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -633,6 +633,10 @@ static struct io_pgtable *arm_v7s_alloc_pgtable(struct io_pgtable_cfg *cfg,
{
	struct arm_v7s_io_pgtable *data;

#ifdef PHYS_OFFSET
	if (upper_32_bits(PHYS_OFFSET))
		return NULL;
#endif
	if (cfg->ias > ARM_V7S_ADDR_BITS || cfg->oas > ARM_V7S_ADDR_BITS)
		return NULL;