Let the iommu user ask the iommu to terminate the transaction without printing any error msg via -EFAULT return.
(Alternatively, look for -ENOSYS return instead to trigger the msg?) Signed-off-by: Rob Clark <robdcl...@gmail.com> --- drivers/iommu/arm-smmu.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c index a8d9901..dc26c98 100644 --- a/drivers/iommu/arm-smmu.c +++ b/drivers/iommu/arm-smmu.c @@ -703,15 +703,23 @@ static irqreturn_t arm_smmu_context_fault(int irq, void *dev) flags = fsynr & FSYNR0_WNR ? IOMMU_FAULT_WRITE : IOMMU_FAULT_READ; iova = readq_relaxed(cb_base + ARM_SMMU_CB_FAR); - if (!report_iommu_fault(domain, smmu->dev, iova, flags)) { + + switch (report_iommu_fault(domain, smmu->dev, iova, flags)) { + case 0: ret = IRQ_HANDLED; resume = RESUME_RETRY; - } else { + break; + case -EFAULT: + ret = IRQ_HANDLED; + resume = RESUME_TERMINATE; + break; + default: dev_err_ratelimited(smmu->dev, "Unhandled context fault: iova=0x%08lx, fsynr=0x%x, cb=%d\n", iova, fsynr, cfg->cbndx); ret = IRQ_NONE; resume = RESUME_TERMINATE; + break; } /* Clear the faulting FSR */ -- 2.7.4 _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu