diff options
author | Magnus Damm <magnus@valinux.co.jp> | 2006-09-26 04:52:35 -0400 |
---|---|---|
committer | Andi Kleen <andi@basil.nowhere.org> | 2006-09-26 04:52:35 -0400 |
commit | aada06c9b7f4cdedbeb2bc905893cf1923a0abad (patch) | |
tree | 97ed54604e892044c393136037c7412a7025656e /arch/i386 | |
parent | ba4d40bb5c465f0a4dcc30d02dab80c2cb7e1ff3 (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')
-rw-r--r-- | arch/i386/kernel/topology.c | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/arch/i386/kernel/topology.c b/arch/i386/kernel/topology.c index e2e281d4bcc8..07d6da36a825 100644 --- a/arch/i386/kernel/topology.c +++ b/arch/i386/kernel/topology.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/init.h> | 28 | #include <linux/init.h> |
29 | #include <linux/smp.h> | 29 | #include <linux/smp.h> |
30 | #include <linux/nodemask.h> | 30 | #include <linux/nodemask.h> |
31 | #include <linux/mmzone.h> | ||
31 | #include <asm/cpu.h> | 32 | #include <asm/cpu.h> |
32 | 33 | ||
33 | static struct i386_cpu cpu_devices[NR_CPUS]; | 34 | static struct i386_cpu cpu_devices[NR_CPUS]; |
@@ -55,34 +56,18 @@ EXPORT_SYMBOL(arch_register_cpu); | |||
55 | EXPORT_SYMBOL(arch_unregister_cpu); | 56 | EXPORT_SYMBOL(arch_unregister_cpu); |
56 | #endif /*CONFIG_HOTPLUG_CPU*/ | 57 | #endif /*CONFIG_HOTPLUG_CPU*/ |
57 | 58 | ||
58 | |||
59 | |||
60 | #ifdef CONFIG_NUMA | ||
61 | #include <linux/mmzone.h> | ||
62 | |||
63 | static int __init topology_init(void) | 59 | static int __init topology_init(void) |
64 | { | 60 | { |
65 | int i; | 61 | int i; |
66 | 62 | ||
63 | #ifdef CONFIG_NUMA | ||
67 | for_each_online_node(i) | 64 | for_each_online_node(i) |
68 | register_one_node(i); | 65 | register_one_node(i); |
66 | #endif /* CONFIG_NUMA */ | ||
69 | 67 | ||
70 | for_each_present_cpu(i) | 68 | for_each_present_cpu(i) |
71 | arch_register_cpu(i); | 69 | arch_register_cpu(i); |
72 | return 0; | 70 | return 0; |
73 | } | 71 | } |
74 | 72 | ||
75 | #else /* !CONFIG_NUMA */ | ||
76 | |||
77 | static int __init topology_init(void) | ||
78 | { | ||
79 | int i; | ||
80 | |||
81 | for_each_present_cpu(i) | ||
82 | arch_register_cpu(i); | ||
83 | return 0; | ||
84 | } | ||
85 | |||
86 | #endif /* CONFIG_NUMA */ | ||
87 | |||
88 | subsys_initcall(topology_init); | 73 | subsys_initcall(topology_init); |