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 /mm | |
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 'mm')
-rw-r--r-- | mm/slab.c | 24 |
1 files changed, 0 insertions, 24 deletions
@@ -144,30 +144,6 @@ | |||
144 | #define BYTES_PER_WORD sizeof(void *) | 144 | #define BYTES_PER_WORD sizeof(void *) |
145 | #define REDZONE_ALIGN max(BYTES_PER_WORD, __alignof__(unsigned long long)) | 145 | #define REDZONE_ALIGN max(BYTES_PER_WORD, __alignof__(unsigned long long)) |
146 | 146 | ||
147 | #ifndef ARCH_KMALLOC_MINALIGN | ||
148 | /* | ||
149 | * Enforce a minimum alignment for the kmalloc caches. | ||
150 | * Usually, the kmalloc caches are cache_line_size() aligned, except when | ||
151 | * DEBUG and FORCED_DEBUG are enabled, then they are BYTES_PER_WORD aligned. | ||
152 | * Some archs want to perform DMA into kmalloc caches and need a guaranteed | ||
153 | * alignment larger than the alignment of a 64-bit integer. | ||
154 | * ARCH_KMALLOC_MINALIGN allows that. | ||
155 | * Note that increasing this value may disable some debug features. | ||
156 | */ | ||
157 | #define ARCH_KMALLOC_MINALIGN __alignof__(unsigned long long) | ||
158 | #endif | ||
159 | |||
160 | #ifndef ARCH_SLAB_MINALIGN | ||
161 | /* | ||
162 | * Enforce a minimum alignment for all caches. | ||
163 | * Intended for archs that get misalignment faults even for BYTES_PER_WORD | ||
164 | * aligned buffers. Includes ARCH_KMALLOC_MINALIGN. | ||
165 | * If possible: Do not enable this flag for CONFIG_DEBUG_SLAB, it disables | ||
166 | * some debug features. | ||
167 | */ | ||
168 | #define ARCH_SLAB_MINALIGN 0 | ||
169 | #endif | ||
170 | |||
171 | #ifndef ARCH_KMALLOC_FLAGS | 147 | #ifndef ARCH_KMALLOC_FLAGS |
172 | #define ARCH_KMALLOC_FLAGS SLAB_HWCACHE_ALIGN | 148 | #define ARCH_KMALLOC_FLAGS SLAB_HWCACHE_ALIGN |
173 | #endif | 149 | #endif |