diff options
author | David Woodhouse <dwmw2@infradead.org> | 2010-05-19 07:01:42 -0400 |
---|---|---|
committer | Pekka Enberg <penberg@cs.helsinki.fi> | 2010-05-19 15:03:13 -0400 |
commit | 1f0ce8b3dd667dca720a47869f8110c298f0e5b8 (patch) | |
tree | c0e260b5d8e6d3fe55be2bf6772265ad48878efd /include | |
parent | e40152ee1e1c7a63f4777791863215e3faa37a86 (diff) |
mm: Move ARCH_SLAB_MINALIGN and ARCH_KMALLOC_MINALIGN to <linux/slab_def.h>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/slab_def.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/include/linux/slab_def.h b/include/linux/slab_def.h index ca6b2b317991..1812dac8c496 100644 --- a/include/linux/slab_def.h +++ b/include/linux/slab_def.h | |||
@@ -16,6 +16,30 @@ | |||
16 | #include <linux/compiler.h> | 16 | #include <linux/compiler.h> |
17 | #include <linux/kmemtrace.h> | 17 | #include <linux/kmemtrace.h> |
18 | 18 | ||
19 | #ifndef ARCH_KMALLOC_MINALIGN | ||
20 | /* | ||
21 | * Enforce a minimum alignment for the kmalloc caches. | ||
22 | * Usually, the kmalloc caches are cache_line_size() aligned, except when | ||
23 | * DEBUG and FORCED_DEBUG are enabled, then they are BYTES_PER_WORD aligned. | ||
24 | * Some archs want to perform DMA into kmalloc caches and need a guaranteed | ||
25 | * alignment larger than the alignment of a 64-bit integer. | ||
26 | * ARCH_KMALLOC_MINALIGN allows that. | ||
27 | * Note that increasing this value may disable some debug features. | ||
28 | */ | ||
29 | #define ARCH_KMALLOC_MINALIGN __alignof__(unsigned long long) | ||
30 | #endif | ||
31 | |||
32 | #ifndef ARCH_SLAB_MINALIGN | ||
33 | /* | ||
34 | * Enforce a minimum alignment for all caches. | ||
35 | * Intended for archs that get misalignment faults even for BYTES_PER_WORD | ||
36 | * aligned buffers. Includes ARCH_KMALLOC_MINALIGN. | ||
37 | * If possible: Do not enable this flag for CONFIG_DEBUG_SLAB, it disables | ||
38 | * some debug features. | ||
39 | */ | ||
40 | #define ARCH_SLAB_MINALIGN 0 | ||
41 | #endif | ||
42 | |||
19 | /* | 43 | /* |
20 | * struct kmem_cache | 44 | * struct kmem_cache |
21 | * | 45 | * |