summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitchel Humpherys <mitchelh@codeaurora.org>2015-11-05 11:50:29 -0800
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-22 11:14:33 -0700
commit3a25b40a4e0aff69443e446e4293c7b63828c331 (patch)
tree8056819d6d3a670b87bad339c09fae546fc647b5
parentfa8f99c506b31cd32cd9da8627bd1b3b1e813351 (diff)
iommu/arm-smmu: Make unmapped accesses more obvious
The fault handler currently spits out a ton of information that can make clients' eyes glaze over, and understandably so. One of the most important pieces of information we obtain from the fault handler is whether the faulting address is actually mapped (which we check with a software table walk), but that information is currently not obvious (you have to know that "soft iova-to-phys=0" means that the software table walk failed). Fix this by adding a more obvious error message when we detect an unmapped access. Change-Id: Ib95a916baf3e73934642676de4852a550ae0f54b Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
-rw-r--r--drivers/iommu/arm-smmu.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c
index b989b025e0a5..f9da1c283b45 100644
--- a/drivers/iommu/arm-smmu.c
+++ b/drivers/iommu/arm-smmu.c
@@ -1256,6 +1256,10 @@ static irqreturn_t arm_smmu_context_fault(int irq, void *dev)
(fsr & 0x80000000) ? "MULTI " : "");
dev_err(smmu->dev,
"soft iova-to-phys=%pa\n", &phys_soft);
+ if (!phys_soft)
+ dev_err(smmu->dev,
+ "SOFTWARE TABLE WALK FAILED! Looks like %s accessed an unmapped address!\n",
+ dev_name(smmu->dev));
dev_err(smmu->dev,
"hard iova-to-phys (ATOS)=%pa\n", &phys_atos);
dev_err(smmu->dev, "SID=0x%x\n", frsynra & 0xffff);