]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit - drivers/iommu/arm-smmu.c
iommu/arm-smmu: Refine check for proper size of mapped region
authorAndreas Herrmann <andreas.herrmann@calxeda.com>
Tue, 1 Oct 2013 12:39:06 +0000 (13:39 +0100)
committerWill Deacon <will.deacon@arm.com>
Wed, 9 Oct 2013 13:14:39 +0000 (14:14 +0100)
commitc55af7f719cbb0f0b28f42b3f98f662278f063c2
tree9fb2e46fa757a6b44d9aef5fe373b98909dcabc8
parentb1950b2796da80b66df02db39cc3417266b73767
iommu/arm-smmu: Refine check for proper size of mapped region

There is already a check to print a warning if the size of SMMU
address space (calculated from SMMU register values) is greater than
the size of the mapped memory region (e.g. passed via DT to the
driver).

Adapt this check to print also a warning in case the mapped region is
larger than the SMMU address space.

Such a mismatch could be intentional (to fix wrong register values).
If its not intentional (e.g. due to wrong DT information) this will
very likely cause a malfunction of the driver as SMMU_CB_BASE is
derived from the size of the mapped region. The warning helps to
identify the root cause in this case.

Signed-off-by: Andreas Herrmann <andreas.herrmann@calxeda.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
drivers/iommu/arm-smmu.c