diff options
author | Robin Murphy <robin.murphy@arm.com> | 2016-09-13 13:02:02 -0400 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2016-09-16 04:34:23 -0400 |
commit | 82db33dc5e49fb625262d81125625d07a0d6184e (patch) | |
tree | 6cdfaea2509e4c2de4ba2bd883ca33711892388d | |
parent | fade1ec055dc6b6373e7487906b7899b41d0c46f (diff) |
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: e5fc9753b1a8 ("iommu/io-pgtable: Add ARMv7 short descriptor support")
Reported-by: Eric Auger <eric.auger@redhat.com>
Tested-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
-rw-r--r-- | drivers/iommu/io-pgtable-arm-v7s.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/iommu/io-pgtable-arm-v7s.c b/drivers/iommu/io-pgtable-arm-v7s.c index def8ca1c982d..f50e51c1a9c8 100644 --- a/drivers/iommu/io-pgtable-arm-v7s.c +++ b/drivers/iommu/io-pgtable-arm-v7s.c | |||
@@ -633,6 +633,10 @@ static struct io_pgtable *arm_v7s_alloc_pgtable(struct io_pgtable_cfg *cfg, | |||
633 | { | 633 | { |
634 | struct arm_v7s_io_pgtable *data; | 634 | struct arm_v7s_io_pgtable *data; |
635 | 635 | ||
636 | #ifdef PHYS_OFFSET | ||
637 | if (upper_32_bits(PHYS_OFFSET)) | ||
638 | return NULL; | ||
639 | #endif | ||
636 | if (cfg->ias > ARM_V7S_ADDR_BITS || cfg->oas > ARM_V7S_ADDR_BITS) | 640 | if (cfg->ias > ARM_V7S_ADDR_BITS || cfg->oas > ARM_V7S_ADDR_BITS) |
637 | return NULL; | 641 | return NULL; |
638 | 642 | ||