All of lore.kernel.org
 help / color / mirror / Atom feed
From: Will Deacon <will.deacon@arm.com>
To: Robin Murphy <robin.murphy@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>,
	robh@kernel.org, devicetree@vger.kernel.org,
	linux-arm-msm@vger.kernel.org,
	Jordan Crouse <jcrouse@codeaurora.org>,
	iommu@lists.linux-foundation.org
Subject: Re: [RFC 1/3] iommu/arm-smmu: Add support to opt-in to stalling
Date: Thu, 5 Jan 2017 16:07:55 +0000	[thread overview]
Message-ID: <20170105160755.GN679@arm.com> (raw)
In-Reply-To: <d1a36cc5-265d-6971-f698-29b8d76e7884@arm.com>

On Thu, Jan 05, 2017 at 03:32:50PM +0000, Robin Murphy wrote:
> On 05/01/17 14:47, Will Deacon wrote:
> > On Thu, Jan 05, 2017 at 02:07:31PM +0000, Mark Rutland wrote:
> >> Ok. It would be good to elaborate on what "stalling is useable" means in
> >> the property description. i.e. what specificallty the implementation and
> >> integration need to ensure.
> > 
> > We can describe some of those guarantees in the property description, but
> > it's difficult to enumerate them exhaustively. For example, you wouldn't
> > want stalling to lead to data corruption, denial of service, or for the
> > thing to catch fire, but having those as explicit requirements is a bit
> > daft. It's also impossible to check that you thought of everything.
> > 
> > Aside from renaming the option, I'm really after an opinion on whether
> > it's better to have one property or combine it with the compatible
> > string, because I can see benefits of both and don't much care either
> > way.
> 
> The SMMU implementation side of the decision (i.e. independence of IRQ
> assertion vs. SS) seems like exactly the sort of stuff the compatible
> string already has covered. The integration side I'm less confident can
> be described this way at all - the "this device definitely won't go
> wrong if stalled for an indefinite length of time" is inherently a
> per-master thing, so a single property on the SMMU implying that for
> every device connected to it seems a bit optimistic, and breaks down as
> soon as you have one device in the system for which that isn't true (a
> PCI root complex, say), even if that guy's traffic never crosses paths
> with whichever few devices you actually care about using stalls with.
> 
> I think this needs to be some kind of "arm,smmu-stall-safe" property
> placed on individual master device nodes (mad idea: or even an extra
> cell of flags in the IOMMU specifier) to encapsulate both that the given
> device itself is OK with being stalled, and that it's integrated in such
> a way that its stalled transactions cannot disrupt any *other* device
> (e.g. it has a TBU all to itself). Then upon initialising a context bank
> on a suitable SMMU implementation, we set CFCFG based on whatever device
> is being attached to the corresponding domain, and refuse any subsequent
> attempts to attach a non-stallable device to a stalling domain (and
> possibly even vice-versa).

If we're going to add per-master properties, I'd *really* like them to be
independent of the IOMMU in use. That is, we should be able to re-use this
property as part of supporting SVM for platform devices in future.

But I think we agree that we need:

  1. A compatible string for the SMMU that can be used to infer the SS
     behaviour in the driver

  2. A property on the SMMU to say that it's been integrated in such a
     way that stalling is safe (doesn't deadlock)

  3. A generic master property that says that the device can DMA to
     unpinned memory

Anything else?

Will

  reply	other threads:[~2017-01-05 16:07 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-03 21:30 [RFC 0/3] iommu/arm-smmu: patches for adreno Rob Clark
     [not found] ` <1483479056-15202-1-git-send-email-robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-01-03 21:30   ` [RFC 1/3] iommu/arm-smmu: Add support to opt-in to stalling Rob Clark
     [not found]     ` <1483479056-15202-2-git-send-email-robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-01-05 11:55       ` Will Deacon
2017-01-05 12:08         ` Mark Rutland
2017-01-05 14:00           ` Will Deacon
     [not found]             ` <20170105140005.GJ679-5wv7dgnIgG8@public.gmane.org>
2017-01-05 14:07               ` Mark Rutland
2017-01-05 14:47                 ` Will Deacon
     [not found]                   ` <20170105144742.GK679-5wv7dgnIgG8@public.gmane.org>
2017-01-05 15:32                     ` Robin Murphy
2017-01-05 16:07                       ` Will Deacon [this message]
     [not found]                         ` <20170105160755.GN679-5wv7dgnIgG8@public.gmane.org>
2017-01-05 17:03                           ` Robin Murphy
     [not found]                             ` <611575f4-3e37-1f4d-ef29-94e6f65baf66-5wv7dgnIgG8@public.gmane.org>
2017-01-05 17:25                               ` Will Deacon
2017-01-06 16:36                                 ` Rob Clark
     [not found]         ` <20170105115528.GG679-5wv7dgnIgG8@public.gmane.org>
2017-01-05 15:27           ` Rob Clark
     [not found]             ` <CAF6AEGsUdZALAQTozmxPV8Os=3pG7ay=1Oqtctx99FV9_4SX7Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-01-05 15:49               ` Will Deacon
     [not found]                 ` <20170105154950.GM679-5wv7dgnIgG8@public.gmane.org>
2017-01-06 16:26                   ` Rob Clark
2017-01-10 17:52                     ` Will Deacon
     [not found]                       ` <20170110175219.GK527-5wv7dgnIgG8@public.gmane.org>
2017-01-10 19:20                         ` Rob Clark
     [not found]                           ` <CAF6AEGsCJ6L-wmBHFYy2jfQ1bfq_d2wmiWVUXno344US9ikLVA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-01-11  9:36                             ` Will Deacon
     [not found]                               ` <20170111093606.GA12388-5wv7dgnIgG8@public.gmane.org>
2017-01-11 20:59                                 ` Rob Clark
2017-01-12 15:17                                   ` Will Deacon
     [not found]                                     ` <20170112151717.GB13843-5wv7dgnIgG8@public.gmane.org>
2017-01-30 20:51                                       ` Rob Clark
2017-01-03 21:30   ` [RFC 2/3] iommu/arm-smmu: Add qcom implementation Rob Clark
     [not found]     ` <1483479056-15202-3-git-send-email-robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-01-03 22:28       ` Jordan Crouse
     [not found]         ` <20170103222832.GA19199-9PYrDHPZ2Orvke4nUoYGnHL1okKdlPRT@public.gmane.org>
2017-01-04 13:33           ` Sricharan
2017-01-04 14:31             ` Rob Clark
     [not found]               ` <CAF6AEGuT_qq-UJK3sdvtVqxfsLBH-_jZVKz1vF383tOYVQpraw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-01-04 17:16                 ` Rob Clark
2017-01-03 21:30   ` [RFC 3/3] iommu/arm-smmu: Let fault handler return -EFAULT 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=20170105160755.GN679@arm.com \
    --to=will.deacon@arm.com \
    --cc=devicetree@vger.kernel.org \
    --cc=iommu@lists.linux-foundation.org \
    --cc=jcrouse@codeaurora.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=robh@kernel.org \
    --cc=robin.murphy@arm.com \
    /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.