diff options
author | Christoph Lameter <cl@linux.com> | 2011-06-14 17:16:36 -0400 |
---|---|---|
committer | Pekka Enberg <penberg@kernel.org> | 2011-06-16 12:40:20 -0400 |
commit | 3192b920bf7d0c528ab54e7d3689f44055316a37 (patch) | |
tree | f907471f606a17cef0c1af4bc2187cdd4ee26c64 /include/linux/slub_def.h | |
parent | bd50cfa89153a67429935a15e577a5eb5f10dd1b (diff) |
slab, slub, slob: Unify alignment definition
Every slab has its on alignment definition in include/linux/sl?b_def.h. Extract those
and define a common set in include/linux/slab.h.
SLOB: As notes sometimes we need double word alignment on 32 bit. This gives all
structures allocated by SLOB a unsigned long long alignment like the others do.
SLAB: If ARCH_SLAB_MINALIGN is not set SLAB would set ARCH_SLAB_MINALIGN to
zero meaning no alignment at all. Give it the default unsigned long long alignment.
Signed-off-by: Christoph Lameter <cl@linux.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
Diffstat (limited to 'include/linux/slub_def.h')
-rw-r--r-- | include/linux/slub_def.h | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h index c8668d161dd8..fd4fdc72bc8c 100644 --- a/include/linux/slub_def.h +++ b/include/linux/slub_def.h | |||
@@ -113,16 +113,6 @@ struct kmem_cache { | |||
113 | 113 | ||
114 | #define KMALLOC_SHIFT_LOW ilog2(KMALLOC_MIN_SIZE) | 114 | #define KMALLOC_SHIFT_LOW ilog2(KMALLOC_MIN_SIZE) |
115 | 115 | ||
116 | #ifdef ARCH_DMA_MINALIGN | ||
117 | #define ARCH_KMALLOC_MINALIGN ARCH_DMA_MINALIGN | ||
118 | #else | ||
119 | #define ARCH_KMALLOC_MINALIGN __alignof__(unsigned long long) | ||
120 | #endif | ||
121 | |||
122 | #ifndef ARCH_SLAB_MINALIGN | ||
123 | #define ARCH_SLAB_MINALIGN __alignof__(unsigned long long) | ||
124 | #endif | ||
125 | |||
126 | /* | 116 | /* |
127 | * Maximum kmalloc object size handled by SLUB. Larger object allocations | 117 | * Maximum kmalloc object size handled by SLUB. Larger object allocations |
128 | * are passed through to the page allocator. The page allocator "fastpath" | 118 | * are passed through to the page allocator. The page allocator "fastpath" |