[PATCH] x86-64: Only allocate per cpu data for possible CPUs, not compiled in CPUs.
authorAndi Kleen <ak@suse.de>
Mon, 12 Sep 2005 16:49:24 +0000 (18:49 +0200)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 12 Sep 2005 17:49:58 +0000 (10:49 -0700)
Saves some memory except for hotplug situations.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/x86_64/kernel/setup64.c

index e8b54dccb3eea3571b4397827c41ee6e2febc8b9..bd33be24a386717d3c402059ce49ba0dad3ab838 100644 (file)
@@ -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))) {