From mboxrd@z Thu Jan 1 00:00:00 1970 From: Will Deacon Subject: Re: [PATCH 8/9] iommu/arm-smmu: Introduce a default fault handler Date: Fri, 27 Sep 2013 11:09:02 +0100 Message-ID: <20130927100902.GD9057@mudshark.cambridge.arm.com> References: <1380234982-1677-1-git-send-email-andreas.herrmann@calxeda.com> <1380234982-1677-9-git-send-email-andreas.herrmann@calxeda.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1380234982-1677-9-git-send-email-andreas.herrmann-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Andreas Herrmann Cc: "iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org" , Rob Herring , "linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org" List-Id: iommu@lists.linux-foundation.org On Thu, Sep 26, 2013 at 11:36:20PM +0100, Andreas Herrmann wrote: > And register the default handler for domains that are created during > device isolation. > > Signed-off-by: Andreas Herrmann > --- > drivers/iommu/arm-smmu.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c > index 48f3bfb..380c2a0 100644 > --- a/drivers/iommu/arm-smmu.c > +++ b/drivers/iommu/arm-smmu.c > @@ -1816,6 +1816,13 @@ static int arm_smmu_device_cfg_probe(struct arm_smmu_device *smmu) > return 0; > } > > +static int arm_smmu_context_fault_handler(struct iommu_domain *domain, > + struct device *dev, unsigned long iova, int flags, void *arg) > +{ > + dev_warn(dev, "context fault: iova=0x%08lx, flags=0x%x\n", iova, flags); > + return 0; Maybe we're better off sandwiching this into arm_smmu_context_fault when report_iommu_fault doesn't handle the fault. Will