summaryrefslogtreecommitdiff
path: root/include/linux/slob_def.h
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2010-08-10 18:03:22 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2010-08-11 08:59:21 -0700
commita6eb9fe105d5de0053b261148cee56c94b4720ca (patch)
tree36e3f324a6a768397ef398674176c0f5f5365bff /include/linux/slob_def.h
parentcd1542c8197fc3c2eb3a8301505d5d9738fab1e4 (diff)
downloadlinux-3.10-a6eb9fe105d5de0053b261148cee56c94b4720ca.tar.gz
linux-3.10-a6eb9fe105d5de0053b261148cee56c94b4720ca.tar.bz2
linux-3.10-a6eb9fe105d5de0053b261148cee56c94b4720ca.zip
dma-mapping: rename ARCH_KMALLOC_MINALIGN to ARCH_DMA_MINALIGN
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>
Diffstat (limited to 'include/linux/slob_def.h')
-rw-r--r--include/linux/slob_def.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/slob_def.h b/include/linux/slob_def.h
index 62667f72c2e..4382db09df4 100644
--- a/include/linux/slob_def.h
+++ b/include/linux/slob_def.h
@@ -1,7 +1,9 @@
#ifndef __LINUX_SLOB_DEF_H
#define __LINUX_SLOB_DEF_H
-#ifndef ARCH_KMALLOC_MINALIGN
+#ifdef ARCH_DMA_MINALIGN
+#define ARCH_KMALLOC_MINALIGN ARCH_DMA_MINALIGN
+#else
#define ARCH_KMALLOC_MINALIGN __alignof__(unsigned long)
#endif