From: FUJITA Tomonori Date: Wed, 26 May 2010 21:44:23 +0000 (-0700) Subject: Documentation/DMA-API-HOWTO: add ARCH_KMALLOC_MINALIGN description X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2fd74e25df46ecb0b54700aba242dcaeb2d75f4a;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git Documentation/DMA-API-HOWTO: add ARCH_KMALLOC_MINALIGN description Add ARCH_KMALLOC_MINALIGN description in "Platform Issues" section. Signed-off-by: FUJITA Tomonori Cc: "David S. Miller" Cc: Matt Mackall Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- 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". 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