aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iommu
diff options
context:
space:
mode:
authorWill Deacon <will.deacon@arm.com>2013-07-31 14:21:26 -0400
committerJoerg Roedel <joro@8bytes.org>2013-08-14 06:09:14 -0400
commitadaba320916d246af56821a1aab81a715091e7e5 (patch)
tree434d23ba1dc9f068150b7657d23ee66d9b2ce5cb /drivers/iommu
parent2ae9f2fa3f770c734e713f9a0a4c40bcf2373ab6 (diff)
iommu/arm-smmu: Tighten up global fault reporting
On systems which use a single, combined irq line for the SMMU, context faults may result in us spuriously reporting global faults with zero status registers. This patch fixes up the fsr checks in both the context and global fault interrupt handlers, so that we only report the fault if the fsr indicates something did indeed go awry. Signed-off-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Joerg Roedel <joro@8bytes.org>
Diffstat (limited to 'drivers/iommu')
-rw-r--r--drivers/iommu/arm-smmu.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c
index da8af45634ac..3a595bb5b824 100644
--- a/drivers/iommu/arm-smmu.c
+++ b/drivers/iommu/arm-smmu.c
@@ -305,7 +305,7 @@
305#define FSR_IGN (FSR_AFF | FSR_ASF | FSR_TLBMCF | \ 305#define FSR_IGN (FSR_AFF | FSR_ASF | FSR_TLBMCF | \
306 FSR_TLBLKF) 306 FSR_TLBLKF)
307#define FSR_FAULT (FSR_MULTI | FSR_SS | FSR_UUT | \ 307#define FSR_FAULT (FSR_MULTI | FSR_SS | FSR_UUT | \
308 FSR_EF | FSR_PF | FSR_TF) 308 FSR_EF | FSR_PF | FSR_TF | FSR_IGN)
309 309
310#define FSYNR0_WNR (1 << 4) 310#define FSYNR0_WNR (1 << 4)
311 311
@@ -590,6 +590,9 @@ static irqreturn_t arm_smmu_global_fault(int irq, void *dev)
590 void __iomem *gr0_base = ARM_SMMU_GR0(smmu); 590 void __iomem *gr0_base = ARM_SMMU_GR0(smmu);
591 591
592 gfsr = readl_relaxed(gr0_base + ARM_SMMU_GR0_sGFSR); 592 gfsr = readl_relaxed(gr0_base + ARM_SMMU_GR0_sGFSR);
593 if (!gfsr)
594 return IRQ_NONE;
595
593 gfsynr0 = readl_relaxed(gr0_base + ARM_SMMU_GR0_sGFSYNR0); 596 gfsynr0 = readl_relaxed(gr0_base + ARM_SMMU_GR0_sGFSYNR0);
594 gfsynr1 = readl_relaxed(gr0_base + ARM_SMMU_GR0_sGFSYNR1); 597 gfsynr1 = readl_relaxed(gr0_base + ARM_SMMU_GR0_sGFSYNR1);
595 gfsynr2 = readl_relaxed(gr0_base + ARM_SMMU_GR0_sGFSYNR2); 598 gfsynr2 = readl_relaxed(gr0_base + ARM_SMMU_GR0_sGFSYNR2);
@@ -601,7 +604,7 @@ static irqreturn_t arm_smmu_global_fault(int irq, void *dev)
601 gfsr, gfsynr0, gfsynr1, gfsynr2); 604 gfsr, gfsynr0, gfsynr1, gfsynr2);
602 605
603 writel(gfsr, gr0_base + ARM_SMMU_GR0_sGFSR); 606 writel(gfsr, gr0_base + ARM_SMMU_GR0_sGFSR);
604 return IRQ_NONE; 607 return IRQ_HANDLED;
605} 608}
606 609
607static void arm_smmu_init_context_bank(struct arm_smmu_domain *smmu_domain) 610static void arm_smmu_init_context_bank(struct arm_smmu_domain *smmu_domain)