--- init/main.c | 2 ++ mm/cpu_alloc.c | 18 +++++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) Index: linux-2.6/init/main.c =================================================================== --- linux-2.6.orig/init/main.c 2008-01-28 18:05:31.000000000 -0800 +++ linux-2.6/init/main.c 2008-01-28 18:07:30.000000000 -0800 @@ -89,6 +89,7 @@ extern void pidmap_init(void); extern void prio_tree_init(void); extern void radix_tree_init(void); extern void free_initmem(void); +extern void cpu_alloc_init(void); #ifdef CONFIG_ACPI extern void acpi_early_init(void); #else @@ -562,6 +563,7 @@ asmlinkage void __init start_kernel(void "enabled *very* early, fixing it\n"); local_irq_disable(); } + cpu_alloc_init(); sort_main_extable(); trap_init(); rcu_init(); Index: linux-2.6/mm/cpu_alloc.c =================================================================== --- linux-2.6.orig/mm/cpu_alloc.c 2008-01-28 17:54:33.000000000 -0800 +++ linux-2.6/mm/cpu_alloc.c 2008-01-28 18:05:21.000000000 -0800 @@ -17,6 +17,7 @@ #include #include #include +#include /* * Can be configred from the kernel command line @@ -78,7 +79,7 @@ static int size_to_units(unsigned long s static DEFINE_SPINLOCK(cpu_alloc_map_lock); static unsigned long units_reserved; /* Units reserved by boot allocations */ -static DECLARE_BITMAP(cpu_alloc_map, UNITS); +static unsigned long *cpu_alloc_map; void * __init boot_cpu_alloc(unsigned long size) { @@ -210,3 +211,18 @@ void cpu_free(void *start, unsigned long spin_unlock_irqrestore(&cpu_alloc_map_lock, flags); } EXPORT_SYMBOL(cpu_free); + +/* + * Setup cpu_alloc. All boot time boot_cpu_alloc() must have been completed. + */ +static void cpu_alloc_init(void) +{ + unsigned long size; + + size = (size_to_units(cpu_alloc_size) - units_reserved) * UNIT_SIZE; + + cpu_alloc_map = alloc_bootmem(size); +} + + +