All of lore.kernel.org
 help / color / mirror / Atom feed
From: Will Deacon <will.deacon-5wv7dgnIgG8@public.gmane.org>
To: Stanimir Varbanov
	<stanimir.varbanov-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
	Robin Murphy <robin.murphy-5wv7dgnIgG8@public.gmane.org>,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [PATCH] iommu: arm-smmu: handle client iommu translation fault handlers
Date: Wed, 10 Oct 2018 18:08:37 +0100	[thread overview]
Message-ID: <20181010170837.GC16512@arm.com> (raw)
In-Reply-To: <20181010144407.23336-1-stanimir.varbanov-QSEj5FYQhm4dnm+yROfE0A@public.gmane.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 <stanimir.varbanov-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> ---
>  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

WARNING: multiple messages have this Message-ID (diff)
From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] iommu: arm-smmu: handle client iommu translation fault handlers
Date: Wed, 10 Oct 2018 18:08:37 +0100	[thread overview]
Message-ID: <20181010170837.GC16512@arm.com> (raw)
In-Reply-To: <20181010144407.23336-1-stanimir.varbanov@linaro.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 <stanimir.varbanov@linaro.org>
> ---
>  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

WARNING: multiple messages have this Message-ID (diff)
From: Will Deacon <will.deacon@arm.com>
To: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Cc: Joerg Roedel <joro@8bytes.org>,
	Robin Murphy <robin.murphy@arm.com>,
	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
Date: Wed, 10 Oct 2018 18:08:37 +0100	[thread overview]
Message-ID: <20181010170837.GC16512@arm.com> (raw)
In-Reply-To: <20181010144407.23336-1-stanimir.varbanov@linaro.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 <stanimir.varbanov@linaro.org>
> ---
>  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

  parent reply	other threads:[~2018-10-10 17:08 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-10 14:44 [PATCH] iommu: arm-smmu: handle client iommu translation fault handlers Stanimir Varbanov
2018-10-10 14:44 ` Stanimir Varbanov
     [not found] ` <20181010144407.23336-1-stanimir.varbanov-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2018-10-10 17:08   ` Will Deacon [this message]
2018-10-10 17:08     ` Will Deacon
2018-10-10 17:08     ` Will Deacon
     [not found]     ` <20181010170837.GC16512-5wv7dgnIgG8@public.gmane.org>
2018-10-11 12:26       ` Stanimir Varbanov
2018-10-11 12:26         ` Stanimir Varbanov
2018-10-11 12:26         ` Stanimir Varbanov
     [not found]         ` <6edd8f71-4363-01b6-6b45-aebc92604559-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2018-10-19 17:44           ` Will Deacon
2018-10-19 17:44             ` Will Deacon
2018-10-19 17:44             ` Will Deacon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181010170837.GC16512@arm.com \
    --to=will.deacon-5wv7dgnigg8@public.gmane.org \
    --cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=robin.murphy-5wv7dgnIgG8@public.gmane.org \
    --cc=stanimir.varbanov-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.