Modules: Remove PERCPU_ENOUGH_ROOM The constant is now useless since the modules subsystem can expand its per cpu area as needed. Signed-off-by: Christoph Lameter --- arch/powerpc/kernel/setup_64.c | 5 ----- arch/sparc64/kernel/smp.c | 2 +- arch/x86/kernel/setup64.c | 4 ++-- include/asm-ia64/percpu.h | 2 -- include/linux/percpu.h | 7 ------- init/main.c | 2 +- kernel/lockdep.c | 3 +-- 7 files changed, 5 insertions(+), 20 deletions(-) Index: linux-2.6/include/asm-ia64/percpu.h =================================================================== --- linux-2.6.orig/include/asm-ia64/percpu.h 2008-05-21 15:44:55.000000000 -0700 +++ linux-2.6/include/asm-ia64/percpu.h 2008-05-21 15:57:57.000000000 -0700 @@ -6,8 +6,6 @@ * David Mosberger-Tang */ -#define PERCPU_ENOUGH_ROOM PERCPU_PAGE_SIZE - #ifdef __ASSEMBLY__ # define THIS_CPU(var) (per_cpu__##var) /* use this to mark accesses to per-CPU variables... */ #else /* !__ASSEMBLY__ */ Index: linux-2.6/arch/powerpc/kernel/setup_64.c =================================================================== --- linux-2.6.orig/arch/powerpc/kernel/setup_64.c 2008-05-21 15:44:55.000000000 -0700 +++ linux-2.6/arch/powerpc/kernel/setup_64.c 2008-05-21 15:57:57.000000000 -0700 @@ -596,11 +596,6 @@ /* Copy section for each CPU (we discard the original) */ size = ALIGN(__per_cpu_end - __per_cpu_start, PAGE_SIZE); -#ifdef CONFIG_MODULES - if (size < PERCPU_ENOUGH_ROOM) - size = PERCPU_ENOUGH_ROOM; -#endif - for_each_possible_cpu(i) { ptr = alloc_bootmem_pages_node(NODE_DATA(cpu_to_node(i)), size); if (!ptr) Index: linux-2.6/arch/sparc64/kernel/smp.c =================================================================== --- linux-2.6.orig/arch/sparc64/kernel/smp.c 2008-05-21 15:44:55.000000000 -0700 +++ linux-2.6/arch/sparc64/kernel/smp.c 2008-05-21 15:57:57.000000000 -0700 @@ -1444,7 +1444,7 @@ char *ptr; /* Copy section for each CPU (we discard the original) */ - goal = PERCPU_ENOUGH_ROOM; + goal = __per_cpu_end - __per_cpu_start; __per_cpu_shift = PAGE_SHIFT; for (size = PAGE_SIZE; size < goal; size <<= 1UL) Index: linux-2.6/init/main.c =================================================================== --- linux-2.6.orig/init/main.c 2008-05-21 15:44:55.000000000 -0700 +++ linux-2.6/init/main.c 2008-05-21 15:57:57.000000000 -0700 @@ -398,7 +398,7 @@ unsigned long nr_possible_cpus = num_possible_cpus(); /* Copy section for each CPU (we discard the original) */ - size = ALIGN(PERCPU_ENOUGH_ROOM, PAGE_SIZE); + size = ALIGN(__per_cpu_end - __per_cpu_start, PAGE_SIZE); ptr = alloc_bootmem_pages(size * nr_possible_cpus); for_each_possible_cpu(i) { Index: linux-2.6/kernel/lockdep.c =================================================================== --- linux-2.6.orig/kernel/lockdep.c 2008-05-21 15:45:31.000000000 -0700 +++ linux-2.6/kernel/lockdep.c 2008-05-21 15:57:57.000000000 -0700 @@ -610,7 +610,7 @@ */ for_each_possible_cpu(i) { start = (unsigned long) __per_cpu_start + per_cpu_offset(i); - end = (unsigned long) __per_cpu_start + PERCPU_ENOUGH_ROOM + end = (unsigned long) __per_cpu_start + __per_cpu_size + per_cpu_offset(i); if ((addr >= start) && (addr < end)) Index: linux-2.6/arch/x86/kernel/setup.c =================================================================== --- linux-2.6.orig/arch/x86/kernel/setup.c 2008-05-21 15:56:39.000000000 -0700 +++ linux-2.6/arch/x86/kernel/setup.c 2008-05-21 15:57:57.000000000 -0700 @@ -99,7 +99,7 @@ #endif /* Copy section for each CPU (we discard the original) */ - size = PERCPU_ENOUGH_ROOM; + size = __per_cpu_size; printk(KERN_INFO "PERCPU: Allocating %lu bytes of per cpu data\n", size);