aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorNathan Lynch <nathanl@austin.ibm.com>2006-03-20 18:37:15 -0600
committerPaul Mackerras <paulus@samba.org>2006-03-22 15:04:03 +1100
commit2b2612272c77288b2bd53d5831df737cd669cd93 (patch)
tree551588d4f4709c39e5e0176b81ed5138722e3458 /arch/powerpc
parent482ec7c403d239bb4f1732faf9a14988094ce08b (diff)
downloadkernel_goldelico_gta04-2b2612272c77288b2bd53d5831df737cd669cd93.zip
kernel_goldelico_gta04-2b2612272c77288b2bd53d5831df737cd669cd93.tar.gz
kernel_goldelico_gta04-2b2612272c77288b2bd53d5831df737cd669cd93.tar.bz2
[PATCH] powerpc numa: Consolidate assignment of cpus to nodes
We can plug the boot cpu into its node independently of whether numa topology is detected. And numa_setup_cpu does the right thing for all cases now, so remove special-casing for non-numa from the cpu hotplug callback. Signed-off-by: Nathan Lynch <nathanl@austin.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/mm/numa.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
index 7d6ebe3..e89b22a 100644
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -321,10 +321,7 @@ static int cpu_numa_callback(struct notifier_block *nfb,
switch (action) {
case CPU_UP_PREPARE:
- if (min_common_depth == -1 || !numa_enabled)
- map_cpu_to_node(lcpu, 0);
- else
- numa_setup_cpu(lcpu);
+ numa_setup_cpu(lcpu);
ret = NOTIFY_OK;
break;
#ifdef CONFIG_HOTPLUG_CPU
@@ -459,8 +456,6 @@ new_range:
goto new_range;
}
- numa_setup_cpu(boot_cpuid);
-
return 0;
}
@@ -475,7 +470,6 @@ static void __init setup_nonnuma(void)
printk(KERN_INFO "Memory hole size: %ldMB\n",
(top_of_ram - total_ram) >> 20);
- map_cpu_to_node(boot_cpuid, 0);
for (i = 0; i < lmb.memory.cnt; ++i)
add_region(0, lmb.memory.region[i].base >> PAGE_SHIFT,
lmb_size_pages(&lmb.memory, i));
@@ -612,6 +606,8 @@ void __init do_init_bootmem(void)
dump_numa_memory_topology();
register_cpu_notifier(&ppc64_numa_nb);
+ cpu_numa_callback(&ppc64_numa_nb, CPU_UP_PREPARE,
+ (void *)(unsigned long)boot_cpuid);
for_each_online_node(nid) {
unsigned long start_pfn, end_pfn, pages_present;