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>
This commit is contained in:
+1
-14
@@ -23,6 +23,7 @@
|
||||
#include <linux/kexec.h>
|
||||
#include <asm/uaccess.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/page.h>
|
||||
#include <asm/sections.h>
|
||||
#include <asm/irq.h>
|
||||
#include <asm/setup.h>
|
||||
@@ -389,20 +390,6 @@ struct sh_machine_vector* __init get_mv_byname(const char* name)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static struct cpu cpu[NR_CPUS];
|
||||
|
||||
static int __init topology_init(void)
|
||||
{
|
||||
int cpu_id;
|
||||
|
||||
for_each_possible_cpu(cpu_id)
|
||||
register_cpu(&cpu[cpu_id], cpu_id);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
subsys_initcall(topology_init);
|
||||
|
||||
static const char *cpu_name[] = {
|
||||
[CPU_SH7206] = "SH7206", [CPU_SH7619] = "SH7619",
|
||||
[CPU_SH7604] = "SH7604", [CPU_SH7300] = "SH7300",
|
||||
|
||||
Reference in New Issue
Block a user