]> git.hungrycats.org Git - linux/commitdiff
[PATCH] ia64: setup cpu_to_node for cpus not present
authorAlex Williamson <alex.williamson@hp.com>
Fri, 4 Jun 2004 09:08:45 +0000 (02:08 -0700)
committerDavid Mosberger <davidm@tiger.hpl.hp.com>
Fri, 4 Jun 2004 09:08:45 +0000 (02:08 -0700)
In latest linux-2.5 bitkeeper, if you turn on CONFIG_HOTPLUG_CPU w/
an NR_CPUS greater than physically presents CPUs, you'll end up taking
an MCA in __alloc_percpu().  kmem_cache_alloc_node() gets called with a
node value of -1.  It seems other architectures are defaulting the
cpu_to_node map to zero for possible, but not present cpus.  Here's a
trivial patch that does the same for ia64.

Signed-off-by: David Mosberger <davidm@hpl.hp.com>
arch/ia64/kernel/smpboot.c

index 97541e8998939f8cd92d1f244a174ba7d92db570..8cef119ac9ed39d8ba72cb53d22f42f2e0fbb21f 100644 (file)
@@ -524,7 +524,7 @@ build_cpu_to_node_map (void)
 #else
 #              error Fixme: Dunno how to build CPU-to-node map.
 #endif
-               cpu_to_node_map[cpu] = node;
+               cpu_to_node_map[cpu] = (node >= 0) ? node : 0;
                if (node >= 0)
                        cpu_set(cpu, node_to_cpu_mask[node]);
        }