Skip to content

Commit

Permalink
Documentation/DMA-API-HOWTO: add ARCH_KMALLOC_MINALIGN description
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
FUJITA Tomonori authored and Linus Torvalds committed May 27, 2010
1 parent 4ae9ca8 commit 2fd74e2
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion Documentation/DMA-API-HOWTO.txt
Original file line number Diff line number Diff line change
Expand Up @@ -738,7 +738,20 @@ to "Closing".
CONFIG_NEED_SG_DMA_LENGTH if the architecture supports IOMMUs
(including software IOMMU).

2) More to come...
2) ARCH_KMALLOC_MINALIGN

Architectures must ensure that kmalloc'ed buffer is
DMA-safe. Drivers and subsystems depend on it. If an architecture
isn't fully DMA-coherent (i.e. hardware doesn't ensure that data in
the CPU cache is identical to data in main memory),
ARCH_KMALLOC_MINALIGN must be set so that the memory allocator
makes sure that kmalloc'ed buffer doesn't share a cache line with
the others. See arch/arm/include/asm/cache.h as an example.

Note that ARCH_KMALLOC_MINALIGN is about DMA memory alignment
constraints. You don't need to worry about the architecture data
alignment constraints (e.g. the alignment constraints about 64-bit
objects).

Closing

Expand Down

0 comments on commit 2fd74e2

Please sign in to comment.