linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: mike.looijmans@topic.nl (Mike Looijmans)
To: linux-arm-kernel@lists.infradead.org
Subject: dma-mapping: support for DMA_ATTR_NON_CONSISTENT DMA attribute
Date: Mon, 29 Jun 2015 15:08:48 +0200	[thread overview]
Message-ID: <55914360.6050709@topic.nl> (raw)
In-Reply-To: <20150629094557.GY7557@n2100.arm.linux.org.uk>

On 29-06-15 11:45, Russell King - ARM Linux wrote:
> On Mon, Jun 29, 2015 at 08:44:50AM +0200, Mike Looijmans wrote:
>> ?On 29-06-15 07:24, Sylvain Munaut wrote:
>>> """ By using this API, you are guaranteeing to the platform that you
>>> have all the correct and necessary sync points for this memory in the
>>> driver should it choose to return non-consistent memory."""
>>>
>>> I had assumed it was the dma_sync_* calls, but apparently not.
>>
>> I think the answer is "the dma_sync_* calls plus whatever it is your DMA
>> controller hardware needs to do"
>
> No it is not.  When something is clearly the wrong API, you do not go
> around telling people to use it.  I'm pretty disgusted that you think
> that is an appropraite way to behave.

I trying to merely refer to the "correct and necessary sync points" part, once 
the decision to (properly) use the streaming API has been made.

To the best of my knowledge, the dma_sync_... methods take care of things from 
the ARM (CPU) side.

That leaves only the device side, you need to make sure that for example its 
FIFOs are empty before starting to flush caches. Something that the API cannot 
do for you, but your driver and hardware (or logic in the case of a Zynq) must 
do a proper job too.

Saying something about those things would make the documentation a lot less 
cryptic than just dropping a "correct and necessary sync points" bomb into the 
text and then offering no advise on where one could hope to find some clay 
tablets with engravings explaining what is "correct and necessary".

M.

  reply	other threads:[~2015-06-29 13:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-28 20:32 dma-mapping: support for DMA_ATTR_NON_CONSISTENT DMA attribute Sylvain Munaut
2015-06-28 22:45 ` Russell King - ARM Linux
2015-06-29  5:24   ` Sylvain Munaut
2015-06-29  6:44     ` Mike Looijmans
2015-06-29  9:45       ` Russell King - ARM Linux
2015-06-29 13:08         ` Mike Looijmans [this message]
2015-06-29 10:05       ` Sylvain Munaut
2015-06-29 10:08         ` Russell King - ARM Linux
2015-06-29 13:22           ` Sylvain Munaut

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=55914360.6050709@topic.nl \
    --to=mike.looijmans@topic.nl \
    --cc=linux-arm-kernel@lists.infradead.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 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).