Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5872fb94 authored by Randy Dunlap's avatar Randy Dunlap Committed by Linus Torvalds
Browse files

Documentation: move DMA-mapping.txt to Doc/PCI/



Move DMA-mapping.txt to Documentation/PCI/.

DMA-mapping.txt was supposed to be moved from Documentation/ to
Documentation/PCI/.  The 00-INDEX files in those two directories
were updated, along with a few other text files, but the file
itself somehow escaped being moved, so move it and update more
text files and source files with its new location.

Signed-off-by: default avatarRandy Dunlap <randy.dunlap@oracle.com>
Acked-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
cc:	Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent ca493d17
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@

This document describes the DMA API.  For a more gentle introduction
phrased in terms of the pci_ equivalents (and actual examples) see
DMA-mapping.txt
Documentation/PCI/PCI-DMA-mapping.txt.

This API is split into two pieces.  Part I describes the API and the
corresponding pci_ API.  Part II describes the extensions to the API
+2 −2
Original line number Diff line number Diff line
[ NOTE: The virt_to_bus() and bus_to_virt() functions have been
	superseded by the functionality provided by the PCI DMA
	interface (see Documentation/DMA-mapping.txt).  They continue
	superseded by the functionality provided by the PCI DMA interface
	(see Documentation/PCI/PCI-DMA-mapping.txt).  They continue
	to be documented below for historical purposes, but new code
	must not use them. --davidm 00/12/12 ]

+3 −2
Original line number Diff line number Diff line
@@ -186,8 +186,9 @@ a virtual address mapping (unlike the earlier scheme of virtual address
do not have a corresponding kernel virtual address space mapping) and
low-memory pages.

Note: Please refer to DMA-mapping.txt for a discussion on PCI high mem DMA
aspects and mapping of scatter gather lists, and support for 64 bit PCI.
Note: Please refer to Documentation/PCI/PCI-DMA-mapping.txt for a discussion
on PCI high mem DMA aspects and mapping of scatter gather lists, and support
for 64 bit PCI.

Special handling is required only for cases where i/o needs to happen on
pages at physical memory addresses beyond what the device can support. In these
+6 −5
Original line number Diff line number Diff line
@@ -6,8 +6,9 @@ in the kernel usb programming guide (kerneldoc, from the source code).
API OVERVIEW

The big picture is that USB drivers can continue to ignore most DMA issues,
though they still must provide DMA-ready buffers (see DMA-mapping.txt).
That's how they've worked through the 2.4 (and earlier) kernels.
though they still must provide DMA-ready buffers (see
Documentation/PCI/PCI-DMA-mapping.txt).  That's how they've worked through
the 2.4 (and earlier) kernels.

OR:  they can now be DMA-aware.

@@ -62,8 +63,8 @@ and effects like cache-trashing can impose subtle penalties.
  force a consistent memory access ordering by using memory barriers.  It's
  not using a streaming DMA mapping, so it's good for small transfers on
  systems where the I/O would otherwise thrash an IOMMU mapping.  (See
  Documentation/DMA-mapping.txt for definitions of "coherent" and "streaming"
  DMA mappings.)
  Documentation/PCI/PCI-DMA-mapping.txt for definitions of "coherent" and
  "streaming" DMA mappings.)

  Asking for 1/Nth of a page (as well as asking for N pages) is reasonably
  space-efficient.
@@ -93,7 +94,7 @@ WORKING WITH EXISTING BUFFERS
Existing buffers aren't usable for DMA without first being mapped into the
DMA address space of the device.  However, most buffers passed to your
driver can safely be used with such DMA mapping.  (See the first section
of DMA-mapping.txt, titled "What memory is DMA-able?")
of Documentation/PCI/PCI-DMA-mapping.txt, titled "What memory is DMA-able?")

- When you're using scatterlists, you can map everything at once.  On some
  systems, this kicks in an IOMMU and turns the scatterlists into single
+6 −6
Original line number Diff line number Diff line
@@ -906,7 +906,7 @@ sba_mark_invalid(struct ioc *ioc, dma_addr_t iova, size_t byte_cnt)
 * @dir:  R/W or both.
 * @attrs: optional dma attributes
 *
 * See Documentation/DMA-mapping.txt
 * See Documentation/PCI/PCI-DMA-mapping.txt
 */
dma_addr_t
sba_map_single_attrs(struct device *dev, void *addr, size_t size, int dir,
@@ -1024,7 +1024,7 @@ sba_mark_clean(struct ioc *ioc, dma_addr_t iova, size_t size)
 * @dir:  R/W or both.
 * @attrs: optional dma attributes
 *
 * See Documentation/DMA-mapping.txt
 * See Documentation/PCI/PCI-DMA-mapping.txt
 */
void sba_unmap_single_attrs(struct device *dev, dma_addr_t iova, size_t size,
			    int dir, struct dma_attrs *attrs)
@@ -1102,7 +1102,7 @@ EXPORT_SYMBOL(sba_unmap_single_attrs);
 * @size:  number of bytes mapped in driver buffer.
 * @dma_handle:  IOVA of new buffer.
 *
 * See Documentation/DMA-mapping.txt
 * See Documentation/PCI/PCI-DMA-mapping.txt
 */
void *
sba_alloc_coherent (struct device *dev, size_t size, dma_addr_t *dma_handle, gfp_t flags)
@@ -1165,7 +1165,7 @@ sba_alloc_coherent (struct device *dev, size_t size, dma_addr_t *dma_handle, gfp
 * @vaddr:  virtual address IOVA of "consistent" buffer.
 * @dma_handler:  IO virtual address of "consistent" buffer.
 *
 * See Documentation/DMA-mapping.txt
 * See Documentation/PCI/PCI-DMA-mapping.txt
 */
void sba_free_coherent (struct device *dev, size_t size, void *vaddr, dma_addr_t dma_handle)
{
@@ -1420,7 +1420,7 @@ sba_coalesce_chunks(struct ioc *ioc, struct device *dev,
 * @dir:  R/W or both.
 * @attrs: optional dma attributes
 *
 * See Documentation/DMA-mapping.txt
 * See Documentation/PCI/PCI-DMA-mapping.txt
 */
int sba_map_sg_attrs(struct device *dev, struct scatterlist *sglist, int nents,
		     int dir, struct dma_attrs *attrs)
@@ -1512,7 +1512,7 @@ EXPORT_SYMBOL(sba_map_sg_attrs);
 * @dir:  R/W or both.
 * @attrs: optional dma attributes
 *
 * See Documentation/DMA-mapping.txt
 * See Documentation/PCI/PCI-DMA-mapping.txt
 */
void sba_unmap_sg_attrs(struct device *dev, struct scatterlist *sglist,
			int nents, int dir, struct dma_attrs *attrs)
Loading