public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: akepner@sgi.com
To: Grant Grundler <grundler@parisc-linux.org>,
	Jesse Barnes <jbarnes@virtuousgeek.org>,
	Jes Sorensen <jes@sgi.com>,
	Randy Dunlap <randy.dunlap@oracle.com>,
	David Miller <davem@davemloft.net>,
	Roland Dreier <rdreier@cisco.com>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 3/4] dma: document dma_flags_set_dmaflush()
Date: Tue, 25 Sep 2007 17:03:30 -0700	[thread overview]
Message-ID: <20070926000330.GN30013@sgi.com> (raw)


Document dma_flags_set_dmaflush().

Signed-off-by: Arthur Kepner <akepner@sgi.com>
--
 DMA-mapping.txt |   25 ++++++++++++++++++++++++-
 1 file changed, 24 insertions(+), 1 deletion(-)

diff --git a/Documentation/DMA-mapping.txt b/Documentation/DMA-mapping.txt
index e07f253..31e3234 100644
--- a/Documentation/DMA-mapping.txt
+++ b/Documentation/DMA-mapping.txt
@@ -745,7 +745,30 @@ to "Closing".
    2.5., page+offset is always used, and the "address" field has been
    deleted.
 
-2) More to come...
+2) Platforms that permit DMA reordering
+
+   At least one platform (SGI SN2) allows DMA to be reordered between
+   device and host memory. This reordering can happen in the NUMA
+   interconnect, and it usually results in correct operation and improved
+   performance. In some situations it may be necessary to explicitly
+   synchronize DMA from the device. For example, if the device does a DMA
+   write to indicate that data is ready, the DMA of the "completion
+   indication" can race with DMA of data. In this situation,
+   dma_flags_set_dmaflush() can be used to associate a "dmaflush"
+   attribute with a memory region. The dmaflush attribute will cause in-
+   flight DMA from the device to be flushed to host memory when the
+   associated memory region is written. (On platforms that don't permit
+   DMA reordering, this is a no-op.)
+
+   For example, you might map the memory region used for completion
+   indications as follows:
+
+	int count, flags = dma_flags_set_dmaflush(DMA_BIDIRECTIONAL);
+	.....
+	count = dma_map_sg(dev, sglist, nents, flags);
+
+
+3) More to come...
 
 			Handling Errors
 

                 reply	other threads:[~2007-09-26  0:04 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20070926000330.GN30013@sgi.com \
    --to=akepner@sgi.com \
    --cc=davem@davemloft.net \
    --cc=grundler@parisc-linux.org \
    --cc=jbarnes@virtuousgeek.org \
    --cc=jes@sgi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=randy.dunlap@oracle.com \
    --cc=rdreier@cisco.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