From: Andi Kleen Date: Mon, 12 Sep 2005 16:49:24 +0000 (+0200) Subject: [PATCH] x86-64: Only allocate per cpu data for possible CPUs, not compiled in CPUs. X-Git-Tag: v2.6.14-rc1~52 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=e99b861a3e9ec93a48b985519e09b2515c201e8d;p=linux-2.6-omap-h63xx.git [PATCH] x86-64: Only allocate per cpu data for possible CPUs, not compiled in CPUs. Saves some memory except for hotplug situations. Signed-off-by: Andi Kleen Signed-off-by: Linus Torvalds --- diff --git a/arch/x86_64/kernel/setup64.c b/arch/x86_64/kernel/setup64.c index e8b54dccb3e..bd33be24a38 100644 --- a/arch/x86_64/kernel/setup64.c +++ b/arch/x86_64/kernel/setup64.c @@ -94,7 +94,7 @@ void __init setup_per_cpu_areas(void) size = PERCPU_ENOUGH_ROOM; #endif - for (i = 0; i < NR_CPUS; i++) { + for_each_cpu_mask (i, cpu_possible_map) { char *ptr; if (!NODE_DATA(cpu_to_node(i))) {