diff options
author | Robin Murphy <robin.murphy@arm.com> | 2016-09-13 20:02:02 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-11-18 12:51:49 +0300 |
commit | 2ef38255b5880f7dbb089b48411468fbc4fa3d07 (patch) | |
tree | 17c7b4279163dd7a90b0e343a1391ce3c0cbb85d /drivers/iommu | |
parent | d3d9428d71333b0929c30e7d3feacac6306828d5 (diff) | |
download | linux-2ef38255b5880f7dbb089b48411468fbc4fa3d07.tar.xz |
iommu/io-pgtable-arm: Check for v7s-incapable systems
commit 82db33dc5e49fb625262d81125625d07a0d6184e upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/iommu')
-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, { 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; |