提交 7123a6ca 编写于 作者: M Mark Salter

C6X: add register_cpu call

Commit ccbc60d3 requires CPU
topology information even in !SMP cases. This requires C6X to
add a call tp register_cpu() in order to avoid a panic at
boot time.
Signed-off-by: NMark Salter <msalter@redhat.com>
上级 d5981a5f
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/clk.h> #include <linux/clk.h>
#include <linux/cpu.h>
#include <linux/fs.h> #include <linux/fs.h>
#include <linux/of.h> #include <linux/of.h>
...@@ -493,3 +494,17 @@ const struct seq_operations cpuinfo_op = { ...@@ -493,3 +494,17 @@ const struct seq_operations cpuinfo_op = {
c_next, c_next,
show_cpuinfo show_cpuinfo
}; };
static struct cpu cpu_devices[NR_CPUS];
static int __init topology_init(void)
{
int i;
for_each_present_cpu(i)
register_cpu(&cpu_devices[i], i);
return 0;
}
subsys_initcall(topology_init);
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册