summaryrefslogtreecommitdiffstats
path: root/arch/i386/kernel/topology.c
diff options
context:
space:
mode:
authorMagnus Damm <magnus@valinux.co.jp>2006-09-26 10:52:35 +0200
committerAndi Kleen <andi@basil.nowhere.org>2006-09-26 10:52:35 +0200
commitaada06c9b7f4cdedbeb2bc905893cf1923a0abad (patch)
tree97ed54604e892044c393136037c7412a7025656e /arch/i386/kernel/topology.c
parentba4d40bb5c465f0a4dcc30d02dab80c2cb7e1ff3 (diff)
[PATCH] i386: clean up topology.c
There is no need to duplicate the topology_init() function. Signed-off-by: Magnus Damm <magnus@valinux.co.jp> Signed-off-by: Andi Kleen <ak@suse.de>
Diffstat (limited to 'arch/i386/kernel/topology.c')
-rw-r--r--arch/i386/kernel/topology.c21
1 files changed, 3 insertions, 18 deletions
diff --git a/arch/i386/kernel/topology.c b/arch/i386/kernel/topology.c
index e2e281d4bcc..07d6da36a82 100644
--- a/arch/i386/kernel/topology.c
+++ b/arch/i386/kernel/topology.c
@@ -28,6 +28,7 @@
#include <linux/init.h>
#include <linux/smp.h>
#include <linux/nodemask.h>
+#include <linux/mmzone.h>
#include <asm/cpu.h>
static struct i386_cpu cpu_devices[NR_CPUS];
@@ -55,34 +56,18 @@ EXPORT_SYMBOL(arch_register_cpu);
EXPORT_SYMBOL(arch_unregister_cpu);
#endif /*CONFIG_HOTPLUG_CPU*/
-
-
-#ifdef CONFIG_NUMA
-#include <linux/mmzone.h>
-
static int __init topology_init(void)
{
int i;
+#ifdef CONFIG_NUMA
for_each_online_node(i)
register_one_node(i);
+#endif /* CONFIG_NUMA */
for_each_present_cpu(i)
arch_register_cpu(i);
return 0;
}
-#else /* !CONFIG_NUMA */
-
-static int __init topology_init(void)
-{
- int i;
-
- for_each_present_cpu(i)
- arch_register_cpu(i);
- return 0;
-}
-
-#endif /* CONFIG_NUMA */
-
subsys_initcall(topology_init);