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

Commit ce00f7fe authored by FUJITA Tomonori's avatar FUJITA Tomonori Committed by Linus Torvalds
Browse files

Documentation: DMA-API-HOWTO.txt: rename ARCH_KMALLOC_MINALIGN to ARCH_DMA_MINALIGN



ARCH_KMALLOC_MINALIGN was renamed to ARCH_DMA_MINALIGN (the commit
a6eb9fe1).

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

Signed-off-by: default avatarFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent b171aa27
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -738,17 +738,17 @@ to "Closing".
   CONFIG_NEED_SG_DMA_LENGTH if the architecture supports IOMMUs
   CONFIG_NEED_SG_DMA_LENGTH if the architecture supports IOMMUs
   (including software IOMMU).
   (including software IOMMU).


2) ARCH_KMALLOC_MINALIGN
2) ARCH_DMA_MINALIGN


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


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