Commit graph

19 commits

Author SHA1 Message Date
Liu Hua
b2dd83b377 Documentation: correct parameter error for dma_mapping_error
dma_mapping_error takes two parameters, but some of examples
in Documentation/DMA-API-HOWTO.txt just takes one. So correct
it.

Signed-off-by: Liu Hua <sdu.liu@huawei.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-09-26 11:22:29 +02:00
Gioh Kim
2af9da8638 DMA-API: Update dma_pool_create ()and dma_pool_alloc() descriptions
Use "boundary" to be more descriptive than "alloc" in the dma_pool_create()
documentation.

Replace "SLAB_KERNEL" and "SLAB_ATOMIC" with the correct "GFP_KERNEL" and
"GFP_ATOMIC."

[bhelgaas: changelog]
Signed-off-by: Gioh Kim <gioh.kim@lge.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
2014-05-26 17:28:28 -06:00
Emilio López
34c815fbdc DMA-API: Fix duplicated word in DMA-API-HOWTO.txt
"coherent" is written twice when it should be just once.

Signed-off-by: Emilio López <emilio@elopez.com.ar>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
2014-05-26 17:28:27 -06:00
Bjorn Helgaas
f311a724a7 DMA-API: Capitalize "CPU" consistently
Sometimes we used "cpu," other times "CPU."  Use "CPU" consistently.

Suggested-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
2014-05-26 17:28:27 -06:00
Bjorn Helgaas
77f2ea2f8d DMA-API: Clarify physical/bus address distinction
The DMA-API documentation sometimes refers to "physical addresses" when it
really means "bus addresses."  Sometimes these are identical, but they may
be different if the bridge leading to the bus performs address translation.
Update the documentation to use "bus address" when appropriate.

Also, consistently capitalize "DMA", use parens with function names, use
dev_printk() in examples, and reword a few sections for clarity.

No functional change; documentation changes only.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: James Bottomley <jbottomley@Parallels.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
2014-05-20 16:54:21 -06:00
Russell King
4aa806b771 DMA-API: provide a helper to set both DMA and coherent DMA masks
Provide a helper to set both the DMA and coherent DMA masks to the
same value - this avoids duplicated code in a number of drivers,
sometimes with buggy error handling, and also allows us identify
which drivers do things differently.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2013-09-17 15:32:37 +01:00
Andrew Morton
11cd3db01b Documentation/DMA-API-HOWTO.txt: fix typo
Noted by Jesper

Cc: Jesper Juhl <jj@chaosbits.net>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Shuah Khan <shuah.khan@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-02-27 19:10:23 -08:00
Shuah Khan
be62bc4100 Documentation/DMA-API-HOWTO.txt: minor grammar corrections
Signed-off-by: Shuah Khan <shuah.khan@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-02-27 19:10:11 -08:00
Shuah Khan
8d7f62e6a7 Documentation DMA-API-HOWTO.txt Add dma mapping error check usage examples
Enhance the document to discuss the importance of dma
mapping error checks after dma_map_single() and
dma_map_page() calls. Also added usage examples that include
unmap examples in error paths when dma mapping error is
returned.  Includes correct and incorrect usages to high
light some common mistakes in error paths especially when
dma mapping fails when more than one dma mapping call is
made.

Signed-off-by: Shuah Khan <shuah.khan@hp.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2012-10-24 17:07:43 +02:00
Michal Miroslaw
3f0fb4e85b Documentation/DMA-API-HOWTO.txt: fix misleading example
See: DMA-API.txt, part Id, DMA_FROM_DEVICE description.

Signed-off-by: Michal Miroslaw <mirq-linux@rere.qmqm.pl>
Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-07-26 16:49:45 -07:00
FUJITA Tomonori
ce00f7feb0 Documentation: DMA-API-HOWTO.txt: rename ARCH_KMALLOC_MINALIGN to ARCH_DMA_MINALIGN
ARCH_KMALLOC_MINALIGN was renamed to ARCH_DMA_MINALIGN (the commit
a6eb9fe105).

ARCH_DMA_MINALIGN must be defined instead of ARCH_KMALLOC_MINALIGN to
ensure that kmalloc'ed buffer is DMA-safe.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-08-14 11:56:46 -07:00
FUJITA Tomonori
c31e74c4c3 Documentation: DMA-API-HOWTO.txt: add multiple types of IOMMUs support
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-08-11 08:59:21 -07:00
FUJITA Tomonori
2fd74e25df Documentation/DMA-API-HOWTO: add ARCH_KMALLOC_MINALIGN description
Add ARCH_KMALLOC_MINALIGN description in "Platform Issues" section.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Matt Mackall <mpm@selenic.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-05-27 09:12:53 -07:00
FUJITA Tomonori
4ae9ca825e Documentation: move the error handling to the better place in DMA-API-HOWTO
Handing DMA mapping errors is essential.  Let's put it in the more
appropriate place rather than the end of the doc.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-05-27 09:12:53 -07:00
FUJITA Tomonori
b02de87161 Documentation: update scatterlist struct description in DMA-API-HOWTO
Now we have <asm-generic/scatterlist.h>.  Architectures should use it
instead of inventing the own scatterlist struct.  Let's update the
description.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-05-27 09:12:53 -07:00
FUJITA Tomonori
7cdcc8e476 Documentation: add SCSI drivers' mapping error handling to DMA-API-HOWTO
Add the concrete DMA mapping error handling for SCSI drivers on the
queuecommand path.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: James Bottomley <James.Bottomley@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-05-27 09:12:53 -07:00
FUJITA Tomonori
f671be04dc Documentation: add networking driver's mapping error handling to DMA-API-HOWTO
Adds the concrete DMA mapping error handling for Networking drivers on the
transmit path.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-05-27 09:12:52 -07:00
Francis Galiegue
a33f32244d Documentation/: it's -> its where appropriate
Fix obvious cases of "it's" being used when "its" was meant.

Signed-off-by: Francis Galiegue <fgaliegue@gmail.com>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-04-23 02:09:52 +02:00
FUJITA Tomonori
5e07c2c730 Documentation: rename PCI/PCI-DMA-mapping.txt to DMA-API-HOWTO.txt
This patch renames PCI/PCI-DMA-mapping.txt to DMA-API-HOWTO.txt.

The commit 51e7364ef2 "Documentation: rename
PCI-DMA-mapping.txt to DMA-API-HOWTO.txt" was supposed to do this but it
didn't.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-03-24 16:31:20 -07:00
Renamed from Documentation/PCI/PCI-DMA-mapping.txt (Browse further)