]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
iommu/io-pgtable-arm: Check for v7s-incapable systems
authorRobin Murphy <robin.murphy@arm.com>
Tue, 13 Sep 2016 17:02:02 +0000 (18:02 +0100)
committerWill Deacon <will.deacon@arm.com>
Fri, 16 Sep 2016 08:34:23 +0000 (09:34 +0100)
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>
drivers/iommu/io-pgtable-arm-v7s.c

index def8ca1c982d5869a358ca69467a6f13763c46fb..f50e51c1a9c88630b03ca9095a2d6e732f671aee 100644 (file)
@@ -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;