]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
iommu/arm-smmu: Treat unknown OAS as 48-bit
authorWill Deacon <will.deacon@arm.com>
Mon, 3 Aug 2015 09:35:40 +0000 (10:35 +0100)
committerWill Deacon <will.deacon@arm.com>
Thu, 6 Aug 2015 13:35:38 +0000 (14:35 +0100)
A late change to the SMMUv3 architecture ensures that the OAS field
will be monotonically increasing, so we can assume that an unknown OAS
is at least 48-bit and use that, rather than fail the device probe.

Signed-off-by: Will Deacon <will.deacon@arm.com>
drivers/iommu/arm-smmu-v3.c

index 4f093373f4c30ee8394dc536ff9cfbde53d143e7..e51646a3b9738db7dd9c529349a204ee35772794 100644 (file)
@@ -2550,12 +2550,12 @@ static int arm_smmu_device_probe(struct arm_smmu_device *smmu)
        case IDR5_OAS_44_BIT:
                smmu->oas = 44;
                break;
+       default:
+               dev_info(smmu->dev,
+                       "unknown output address size. Truncating to 48-bit\n");
+               /* Fallthrough */
        case IDR5_OAS_48_BIT:
                smmu->oas = 48;
-               break;
-       default:
-               dev_err(smmu->dev, "unknown output address size!\n");
-               return -ENXIO;
        }
 
        /* Set the DMA mask for our table walker */