diff options
author | Paul Mundt <lethal@linux-sh.org> | 2007-05-13 23:50:43 -0400 |
---|---|---|
committer | Paul Mundt <lethal@hera.kernel.org> | 2007-06-07 22:43:35 -0400 |
commit | 7a302a9674593259866de4a9d5ae8edc03dc1934 (patch) | |
tree | d705d89037c226d9928ce132b332b08e2f00388a /arch/sh/kernel/setup.c | |
parent | 85f6038f2170e3335dda09c3dfb0f83110e87019 (diff) |
sh: Split out CPU topology initialization.
Split out the CPU topology initialization to a separate file,
and switch it to a percpu type, rather than an NR_CPUS array.
At the same time, switch to only registering present CPUs,
rather than using the possible CPU map.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel/setup.c')
-rw-r--r-- | arch/sh/kernel/setup.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c index c27729135935..61152b438325 100644 --- a/arch/sh/kernel/setup.c +++ b/arch/sh/kernel/setup.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/kexec.h> | 23 | #include <linux/kexec.h> |
24 | #include <asm/uaccess.h> | 24 | #include <asm/uaccess.h> |
25 | #include <asm/io.h> | 25 | #include <asm/io.h> |
26 | #include <asm/page.h> | ||
26 | #include <asm/sections.h> | 27 | #include <asm/sections.h> |
27 | #include <asm/irq.h> | 28 | #include <asm/irq.h> |
28 | #include <asm/setup.h> | 29 | #include <asm/setup.h> |
@@ -389,20 +390,6 @@ struct sh_machine_vector* __init get_mv_byname(const char* name) | |||
389 | return NULL; | 390 | return NULL; |
390 | } | 391 | } |
391 | 392 | ||
392 | static struct cpu cpu[NR_CPUS]; | ||
393 | |||
394 | static int __init topology_init(void) | ||
395 | { | ||
396 | int cpu_id; | ||
397 | |||
398 | for_each_possible_cpu(cpu_id) | ||
399 | register_cpu(&cpu[cpu_id], cpu_id); | ||
400 | |||
401 | return 0; | ||
402 | } | ||
403 | |||
404 | subsys_initcall(topology_init); | ||
405 | |||
406 | static const char *cpu_name[] = { | 393 | static const char *cpu_name[] = { |
407 | [CPU_SH7206] = "SH7206", [CPU_SH7619] = "SH7619", | 394 | [CPU_SH7206] = "SH7206", [CPU_SH7619] = "SH7619", |
408 | [CPU_SH7604] = "SH7604", [CPU_SH7300] = "SH7300", | 395 | [CPU_SH7604] = "SH7604", [CPU_SH7300] = "SH7300", |