Commit d737f84b authored by Anton Blanchard's avatar Anton Blanchard Committed by Linus Torvalds

[PATCH] fix slab allocator for non zero boot cpu

The slab allocator doesnt initialise ->array for all cpus. This means
we fail to boot on a machine with boot cpu != 0. I was testing current
2.5 BK.

Luckily Rusty was at hand to explain the ins and outs of initialisers
to me.
parent 047ab431
...@@ -437,7 +437,8 @@ struct arraycache_init initarray_generic __initdata = { { 0, BOOT_CPUCACHE_ENTRI ...@@ -437,7 +437,8 @@ struct arraycache_init initarray_generic __initdata = { { 0, BOOT_CPUCACHE_ENTRI
/* internal cache of cache description objs */ /* internal cache of cache description objs */
static kmem_cache_t cache_cache = { static kmem_cache_t cache_cache = {
.lists = LIST3_INIT(cache_cache.lists), .lists = LIST3_INIT(cache_cache.lists),
.array = { [0] = &initarray_cache.cache }, /* Allow for boot cpu != 0 */
.array = { [0 ... NR_CPUS-1] = &initarray_cache.cache },
.batchcount = 1, .batchcount = 1,
.limit = BOOT_CPUCACHE_ENTRIES, .limit = BOOT_CPUCACHE_ENTRIES,
.objsize = sizeof(kmem_cache_t), .objsize = sizeof(kmem_cache_t),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment