All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joerg Roedel <joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
To: Rob Clark <robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: linux-arm-msm
	<linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Will Deacon <Will.Deacon-5wv7dgnIgG8@public.gmane.org>,
	Linux Kernel Mailing List
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org"
	<iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org>,
	"linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
	<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>
Subject: Re: [RFC] iommu: arm-smmu: stall support
Date: Wed, 27 Sep 2017 14:15:40 +0200	[thread overview]
Message-ID: <20170927121540.GL8398@8bytes.org> (raw)
In-Reply-To: <CAF6AEGuh0FiNWEAmFm+7-7pc6MV5hKKz9cyA_J0d256bY-nYOQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

Hi Rob, Jean,

On Fri, Sep 22, 2017 at 02:42:44PM -0400, Rob Clark wrote:
> I'm in favour if splitting the reporting *somehow*.. the two
> approaches that seemed sane are:
> 
> 1) call fault handler from irq and having separate domain->resume()
> called by the driver, potentially from a wq
> 2) or having two fault callbacks, first called before wq and then
> based on returned value, optionally 2nd callback called from wq
> 
> The first seemed less intrusive to me, but I'm flexible.

How about adding a flag to the fault-handler call-back that tells us
whether it wants to sleep or not. If it wants, we call it from a wq, if
not we call call it directly like we do today in the
report_iommu_fault() function.

In any case we call iommu_ops->resume() when set on completion of the
fault-handler either from the workqueue or report_iommu_fault itself.


Regards,

	Joerg

WARNING: multiple messages have this Message-ID (diff)
From: joro@8bytes.org (Joerg Roedel)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC] iommu: arm-smmu: stall support
Date: Wed, 27 Sep 2017 14:15:40 +0200	[thread overview]
Message-ID: <20170927121540.GL8398@8bytes.org> (raw)
In-Reply-To: <CAF6AEGuh0FiNWEAmFm+7-7pc6MV5hKKz9cyA_J0d256bY-nYOQ@mail.gmail.com>

Hi Rob, Jean,

On Fri, Sep 22, 2017 at 02:42:44PM -0400, Rob Clark wrote:
> I'm in favour if splitting the reporting *somehow*.. the two
> approaches that seemed sane are:
> 
> 1) call fault handler from irq and having separate domain->resume()
> called by the driver, potentially from a wq
> 2) or having two fault callbacks, first called before wq and then
> based on returned value, optionally 2nd callback called from wq
> 
> The first seemed less intrusive to me, but I'm flexible.

How about adding a flag to the fault-handler call-back that tells us
whether it wants to sleep or not. If it wants, we call it from a wq, if
not we call call it directly like we do today in the
report_iommu_fault() function.

In any case we call iommu_ops->resume() when set on completion of the
fault-handler either from the workqueue or report_iommu_fault itself.


Regards,

	Joerg

WARNING: multiple messages have this Message-ID (diff)
From: Joerg Roedel <joro@8bytes.org>
To: Rob Clark <robdclark@gmail.com>
Cc: Jean-Philippe Brucker <jean-philippe.brucker@arm.com>,
	linux-arm-msm <linux-arm-msm@vger.kernel.org>,
	Will Deacon <Will.Deacon@arm.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	"iommu@lists.linux-foundation.org"
	<iommu@lists.linux-foundation.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [RFC] iommu: arm-smmu: stall support
Date: Wed, 27 Sep 2017 14:15:40 +0200	[thread overview]
Message-ID: <20170927121540.GL8398@8bytes.org> (raw)
In-Reply-To: <CAF6AEGuh0FiNWEAmFm+7-7pc6MV5hKKz9cyA_J0d256bY-nYOQ@mail.gmail.com>

Hi Rob, Jean,

On Fri, Sep 22, 2017 at 02:42:44PM -0400, Rob Clark wrote:
> I'm in favour if splitting the reporting *somehow*.. the two
> approaches that seemed sane are:
> 
> 1) call fault handler from irq and having separate domain->resume()
> called by the driver, potentially from a wq
> 2) or having two fault callbacks, first called before wq and then
> based on returned value, optionally 2nd callback called from wq
> 
> The first seemed less intrusive to me, but I'm flexible.

How about adding a flag to the fault-handler call-back that tells us
whether it wants to sleep or not. If it wants, we call it from a wq, if
not we call call it directly like we do today in the
report_iommu_fault() function.

In any case we call iommu_ops->resume() when set on completion of the
fault-handler either from the workqueue or report_iommu_fault itself.


Regards,

	Joerg

  parent reply	other threads:[~2017-09-27 12:15 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-14 19:44 [RFC] iommu: arm-smmu: stall support Rob Clark
2017-09-14 19:44 ` Rob Clark
2017-09-14 19:44 ` Rob Clark
2017-09-18 11:13 ` Jean-Philippe Brucker
2017-09-18 11:13   ` Jean-Philippe Brucker
     [not found]   ` <9c2c136a-8c0f-6196-a135-0135b41c9b6e-5wv7dgnIgG8@public.gmane.org>
2017-09-18 12:11     ` Rob Clark
2017-09-18 12:11       ` Rob Clark
2017-09-18 12:11       ` Rob Clark
     [not found]       ` <CAF6AEGv0WZe-bYXUVYt4WxMX3RFnZxr5038pDg3VOiP8Edx+4Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-09-18 17:33         ` Will Deacon
2017-09-18 17:33           ` Will Deacon
2017-09-18 17:33           ` Will Deacon
2017-09-19 12:30 ` Joerg Roedel
2017-09-19 12:30   ` Joerg Roedel
2017-09-19 14:23   ` Rob Clark
2017-09-19 14:23     ` Rob Clark
2017-09-22  9:02     ` Joerg Roedel
2017-09-22  9:02       ` Joerg Roedel
2017-09-22 10:02       ` Jean-Philippe Brucker
2017-09-22 10:02         ` Jean-Philippe Brucker
2017-09-22 18:42         ` Rob Clark
2017-09-22 18:42           ` Rob Clark
     [not found]           ` <CAF6AEGuh0FiNWEAmFm+7-7pc6MV5hKKz9cyA_J0d256bY-nYOQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-09-27 12:15             ` Joerg Roedel [this message]
2017-09-27 12:15               ` Joerg Roedel
2017-09-27 12:15               ` Joerg Roedel
2017-09-27 13:49               ` Jean-Philippe Brucker
2017-09-27 13:49                 ` Jean-Philippe Brucker
2017-09-27 14:35                 ` Joerg Roedel
2017-09-27 14:35                   ` Joerg Roedel
2017-09-27 16:14                 ` Rob Clark
2017-09-27 16:14                   ` Rob Clark
2019-05-10 18:23         ` Rob Clark
2019-05-10 18:23           ` Rob Clark
2019-05-10 18:23           ` Rob Clark
2019-05-13 18:37           ` Jean-Philippe Brucker
2019-05-13 18:37             ` Jean-Philippe Brucker
2019-05-13 18:37             ` Jean-Philippe Brucker
2019-05-14  1:54             ` Rob Clark
2019-05-14  1:54               ` Rob Clark
2019-05-14  1:54               ` Rob Clark
2019-05-14 10:24               ` Robin Murphy
2019-05-14 10:24                 ` Robin Murphy
2019-05-14 10:24                 ` Robin Murphy
2019-05-14 17:17                 ` Rob Clark
2019-05-14 17:17                   ` Rob Clark
2019-05-14 17:17                   ` Rob Clark

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=20170927121540.GL8398@8bytes.org \
    --to=joro-zlv9swrftaidnm+yrofe0a@public.gmane.org \
    --cc=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=robdclark-Re5JQEeQqe8AvxtiuMwx3w@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.