* [PATCH] i386: clean up topology.c
@ 2006-08-08 8:05 Magnus Damm
0 siblings, 0 replies; only message in thread
From: Magnus Damm @ 2006-08-08 8:05 UTC (permalink / raw)
To: linux-kernel; +Cc: Magnus Damm
i386: clean up topology.c
There is no need to duplicate the topology_init() function.
Signed-off-by: Magnus Damm <magnus@valinux.co.jp>
---
topology.c | 21 +++------------------
1 files changed, 3 insertions(+), 18 deletions(-)
--- 0001/arch/i386/kernel/topology.c
+++ work/arch/i386/kernel/topology.c 2006-08-07 17:39:20.000000000 +0900
@@ -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);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-08-08 8:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-08 8:05 [PATCH] i386: clean up topology.c Magnus Damm
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.