diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2010-05-26 17:44:23 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-27 12:12:53 -0400 |
commit | 2fd74e25df46ecb0b54700aba242dcaeb2d75f4a (patch) | |
tree | 0887964694be2ab02233a3842f5d19b72d38a0fa /Documentation | |
parent | 4ae9ca825e3e28441ef8155c1a81e4c14dfbf38d (diff) |
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>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/DMA-API-HOWTO.txt | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/Documentation/DMA-API-HOWTO.txt b/Documentation/DMA-API-HOWTO.txt index bfd94e90af51..98ce51796f71 100644 --- a/Documentation/DMA-API-HOWTO.txt +++ b/Documentation/DMA-API-HOWTO.txt | |||
@@ -738,7 +738,20 @@ to "Closing". | |||
738 | CONFIG_NEED_SG_DMA_LENGTH if the architecture supports IOMMUs | 738 | CONFIG_NEED_SG_DMA_LENGTH if the architecture supports IOMMUs |
739 | (including software IOMMU). | 739 | (including software IOMMU). |
740 | 740 | ||
741 | 2) More to come... | 741 | 2) ARCH_KMALLOC_MINALIGN |
742 | |||
743 | Architectures must ensure that kmalloc'ed buffer is | ||
744 | DMA-safe. Drivers and subsystems depend on it. If an architecture | ||
745 | isn't fully DMA-coherent (i.e. hardware doesn't ensure that data in | ||
746 | the CPU cache is identical to data in main memory), | ||
747 | ARCH_KMALLOC_MINALIGN must be set so that the memory allocator | ||
748 | makes sure that kmalloc'ed buffer doesn't share a cache line with | ||
749 | the others. See arch/arm/include/asm/cache.h as an example. | ||
750 | |||
751 | Note that ARCH_KMALLOC_MINALIGN is about DMA memory alignment | ||
752 | constraints. You don't need to worry about the architecture data | ||
753 | alignment constraints (e.g. the alignment constraints about 64-bit | ||
754 | objects). | ||
742 | 755 | ||
743 | Closing | 756 | Closing |
744 | 757 | ||