mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 19:00:25 +00:00
![FUJITA Tomonori](/assets/img/avatar_default.png)
Now each architecture has the own dma_get_cache_alignment implementation. dma_get_cache_alignment returns the minimum DMA alignment. Architectures define it as ARCH_KMALLOC_MINALIGN (it's used to make sure that malloc'ed buffer is DMA-safe; the buffer doesn't share a cache with the others). So we can unify dma_get_cache_alignment implementations. This patch: dma_get_cache_alignment() needs to know if an architecture defines ARCH_KMALLOC_MINALIGN or not (needs to know if architecture has DMA alignment restriction). However, slab.h define ARCH_KMALLOC_MINALIGN if architectures doesn't define it. Let's rename ARCH_KMALLOC_MINALIGN to ARCH_DMA_MINALIGN. ARCH_KMALLOC_MINALIGN is used only in the internals of slab/slob/slub (except for crypto). Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Cc: <linux-arch@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 lines
325 B
C
13 lines
325 B
C
#ifndef __ASM_MACH_GENERIC_KMALLOC_H
|
|
#define __ASM_MACH_GENERIC_KMALLOC_H
|
|
|
|
|
|
#ifndef CONFIG_DMA_COHERENT
|
|
/*
|
|
* Total overkill for most systems but need as a safe default.
|
|
* Set this one if any device in the system might do non-coherent DMA.
|
|
*/
|
|
#define ARCH_DMA_MINALIGN 128
|
|
#endif
|
|
|
|
#endif /* __ASM_MACH_GENERIC_KMALLOC_H */
|