diff options
author | Mark Salter <msalter@redhat.com> | 2012-01-08 13:19:38 -0500 |
---|---|---|
committer | Mark Salter <msalter@redhat.com> | 2012-01-08 15:13:10 -0500 |
commit | 7123a6cab02ebc5dca61d0e341267578b245f2f3 (patch) | |
tree | 1f65b1733438c47730250413297db7f81f3d63ff | |
parent | d5981a5f16ed8d648b7f44e4aa19cd25733518a3 (diff) | |
download | talos-obmc-linux-7123a6cab02ebc5dca61d0e341267578b245f2f3.tar.gz talos-obmc-linux-7123a6cab02ebc5dca61d0e341267578b245f2f3.zip |
C6X: add register_cpu call
Commit ccbc60d3e19a1b6ae66ca0d89b3da02dde62088b 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: Mark Salter <msalter@redhat.com>
-rw-r--r-- | arch/c6x/kernel/setup.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/c6x/kernel/setup.c b/arch/c6x/kernel/setup.c index c126f0414be5..0c07921747f4 100644 --- a/arch/c6x/kernel/setup.c +++ b/arch/c6x/kernel/setup.c @@ -23,6 +23,7 @@ #include <linux/delay.h> #include <linux/sched.h> #include <linux/clk.h> +#include <linux/cpu.h> #include <linux/fs.h> #include <linux/of.h> @@ -493,3 +494,17 @@ const struct seq_operations cpuinfo_op = { c_next, 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); |