From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED, USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B5EE4C43441 for ; Wed, 10 Oct 2018 17:08:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8515F214DA for ; Wed, 10 Oct 2018 17:08:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8515F214DA Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727040AbeJKAbl (ORCPT ); Wed, 10 Oct 2018 20:31:41 -0400 Received: from foss.arm.com ([217.140.101.70]:55642 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726607AbeJKAbl (ORCPT ); Wed, 10 Oct 2018 20:31:41 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 4F176ED1; Wed, 10 Oct 2018 10:08:38 -0700 (PDT) Received: from edgewater-inn.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 1FC823F5B3; Wed, 10 Oct 2018 10:08:38 -0700 (PDT) Received: by edgewater-inn.cambridge.arm.com (Postfix, from userid 1000) id D1E9B1AE088A; Wed, 10 Oct 2018 18:08:37 +0100 (BST) Date: Wed, 10 Oct 2018 18:08:37 +0100 From: Will Deacon To: Stanimir Varbanov Cc: Joerg Roedel , Robin Murphy , linux-arm-kernel@lists.infradead.org, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: Re: [PATCH] iommu: arm-smmu: handle client iommu translation fault handlers Message-ID: <20181010170837.GC16512@arm.com> References: <20181010144407.23336-1-stanimir.varbanov@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181010144407.23336-1-stanimir.varbanov@linaro.org> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 10, 2018 at 05:44:07PM +0300, Stanimir Varbanov wrote: > Call iommu client translation fault handler(s). > > Signed-off-by: Stanimir Varbanov > --- > drivers/iommu/arm-smmu.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c > index 066f4c8daf4e..02a8aab0cc59 100644 > --- a/drivers/iommu/arm-smmu.c > +++ b/drivers/iommu/arm-smmu.c > @@ -568,6 +568,9 @@ static irqreturn_t arm_smmu_context_fault(int irq, void *dev) > fsr, iova, fsynr, cfg->cbndx); > > writel(fsr, cb_base + ARM_SMMU_CB_FSR); > + > + report_iommu_fault(domain, smmu->dev, iova, 0); Who's using this? Generally, the callback here isn't so useful because it's called in irq context. We also don't enable stalling since 3714ce1d6655. We previously had fairly detailed discussions on the list with Rob Clark about alternative ways to design this, but I don't remember where it ended up. Will