mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stefan Richter <stefanr@s5r6.in-berlin.de>
To: Vineet Gupta <vineetg76@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Query about DMA map API implementation in non-coherent archs
Date: Sat, 10 Jan 2009 10:30:06 +0100	[thread overview]
Message-ID: <49686A9E.8090808@s5r6.in-berlin.de> (raw)
In-Reply-To: <9f4f8abe0901091045k4a06e2c9v29a7e8a7387e7a48@mail.gmail.com>

Vineet Gupta wrote:
...
> As per dma-mapping and dma-api docs, for streaming DMA mappings arch
> needs to provide 2 seperate APIs
> 
> 1. map API to convert cpu address into DMA address
> 2. sync API to flush/invalidate the dcaches for non-coherent archs
> (essentially when changing the ownership of buffer between cpu and
> device).
> 
> However from what I understood, the map API need not take care of
> proper cache sync.However both ARM and MIPS do the cache sync
> operations in map API as well (this is done standalone in sync APIs
> too). Is there a specific reason for this.
> 
> Drivers such as libata don't even call any sync API. For e.g. libata
> only calls dma_map_sg ( ) while setting up the DMA.
...

dma_map_*() transfers ownership of a buffer from CPUs to the device too.
 In case of DMA_TO_DEVICE or DMA_BIDIRECTIONAL, these calls therefore
have to make sure that the device sees current buffer contents.
-- 
Stefan Richter
-=====-==--= ---= -=-=-
http://arcgraph.de/sr/

  reply	other threads:[~2009-01-10  9:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-09 18:45 Vineet Gupta
2009-01-10  9:30 ` Stefan Richter [this message]
2009-01-14 22:29   ` Vineet Gupta

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=49686A9E.8090808@s5r6.in-berlin.de \
    --to=stefanr@s5r6.in-berlin.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vineetg76@gmail.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

all inboxes | Powered by JetHome®