From 5997478ea4a664a16a5816d9a3cdff3661659906 Mon Sep 17 00:00:00 2001 From: Mitchel Humpherys Date: Wed, 21 Oct 2015 13:59:50 -0700 Subject: [PATCH] iommu/arm-smmu: Make fault triggering more reliable We're currently disabling clocks/power immediately after writing to FSRRESTORE, but if the fault is not handled before we disable the clocks/power then the fault could be lost. Add a 1-second sleep after writing to FSRRESTORE to give the interrupt time to fire before turning clocks/power back off. Change-Id: Ieeba49686da5da92e43f03c3c593166592184433 Signed-off-by: Mitchel Humpherys --- drivers/iommu/arm-smmu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c index 2337ad9900e1..09761b765b2b 100644 --- a/drivers/iommu/arm-smmu.c +++ b/drivers/iommu/arm-smmu.c @@ -1355,6 +1355,8 @@ static void arm_smmu_trigger_fault(struct iommu_domain *domain, dev_err(smmu->dev, "Writing 0x%lx to FSRRESTORE on cb %d\n", flags, cfg->cbndx); writel_relaxed(flags, cb_base + ARM_SMMU_CB_FSRRESTORE); + /* give the interrupt time to fire... */ + msleep(1000); arm_smmu_disable_clocks(smmu); }