Skip to content

Commit

Permalink
C6X: add register_cpu call
Browse files Browse the repository at this point in the history
Commit ccbc60d 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 <[email protected]>
  • Loading branch information
mosalter committed Jan 8, 2012
1 parent d5981a5 commit 7123a6c
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions arch/c6x/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down Expand Up @@ -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);

0 comments on commit 7123a6c

Please sign in to comment.