From: Rob Clark <robdclark@gmail.com>
To: Will Deacon <will.deacon@arm.com>
Cc: Robin Murphy <robin.murphy@arm.com>,
Mark Rutland <mark.rutland@arm.com>,
Rob Herring <robh@kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
linux-arm-msm <linux-arm-msm@vger.kernel.org>,
"iommu@lists.linux-foundation.org"
<iommu@lists.linux-foundation.org>,
Jordan Crouse <jcrouse@codeaurora.org>
Subject: Re: [RFC 1/3] iommu/arm-smmu: Add support to opt-in to stalling
Date: Fri, 6 Jan 2017 11:36:28 -0500 [thread overview]
Message-ID: <CAF6AEGupLYDjBOYptRevM8WqwHDv1Pxcs1G23mj0QpwZU=0nTQ@mail.gmail.com> (raw)
In-Reply-To: <20170105172557.GS679@arm.com>
On Thu, Jan 5, 2017 at 12:25 PM, Will Deacon <will.deacon@arm.com> wrote:
>> That's still got to be a per-master property, not a SMMU property, I
>> think. To illustrate:
>>
>> [A] [B] [C]
>> | |_____|
>> __|______________|___
>> | TBU | | TBU |
>> |_____| SMMU |_____|
>> |__|______________|__|
>> | |
>>
>> Say A and B are instances of some device happy to be stalled, and C is a
>> PCIe RC, and each is attached to their own context bank - enabling
>> stalls for A is definitely fine. However even though B and C are using
>> different context banks, enabling stalls for B might deadlock C if it
>> results in more total outstanding transactions than the TBU's slave port
>> supports. Therefore A can happily claim to be stall-safe, but B cannot
>> due to its integration with respect to C.
>
> So in this case, don't say that B and C can DMA to unpinned memory. You
> need the third property. This property (property 2) is concerned with the
> SMMU itself because, e.g. the way the walker has been integrated can
> cause a deadlock.
fwiw, I guess I'm mostly thinking about case (A).. but I guess in the
(B) case amend my suggestion about adding param to
iommu_set_fault_handler() slightly to consider the enable_stall param
passed in when both (B) and (C) register their fault handlers?
Or I guess the idea about increasing extra cell (which IIUC would let
us add an extra param in dt in the devices iommus property) could also
work. Unless maybe there could be some cases where whether a device
can do stalling is also a function of the driver as well (ie. some
feature needs to be implemented type thing)..
BR,
-R
next prev parent reply other threads:[~2017-01-06 16:36 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1483479056-15202-1-git-send-email-robdclark@gmail.com>
[not found] ` <1483479056-15202-2-git-send-email-robdclark@gmail.com>
[not found] ` <1483479056-15202-2-git-send-email-robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-01-05 11:55 ` [RFC 1/3] iommu/arm-smmu: Add support to opt-in to stalling 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
[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 [this message]
[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
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='CAF6AEGupLYDjBOYptRevM8WqwHDv1Pxcs1G23mj0QpwZU=0nTQ@mail.gmail.com' \
--to=robdclark@gmail.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 \
--cc=will.deacon@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).