diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-17 19:49:06 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-17 19:49:06 +0100 |
commit | 8364919c5698d934860aabc607ffd32b13c8c37c (patch) | |
tree | 8d11db5c61d442f9bfc4499e56353ac120af6f8b /arch/microblaze | |
parent | Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiw... (diff) | |
parent | USB: EHCI: Don't use NO_IRQ in xilinx ehci driver (diff) | |
download | linux-8364919c5698d934860aabc607ffd32b13c8c37c.tar.xz linux-8364919c5698d934860aabc607ffd32b13c8c37c.zip |
Merge branch 'next' of git://git.monstr.eu/linux-2.6-microblaze
* 'next' of git://git.monstr.eu/linux-2.6-microblaze:
USB: EHCI: Don't use NO_IRQ in xilinx ehci driver
microblaze: Add topology init
Diffstat (limited to 'arch/microblaze')
-rw-r--r-- | arch/microblaze/kernel/setup.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/arch/microblaze/kernel/setup.c b/arch/microblaze/kernel/setup.c index 604cd9dd1333..d4fc1a971779 100644 --- a/arch/microblaze/kernel/setup.c +++ b/arch/microblaze/kernel/setup.c @@ -26,6 +26,7 @@ #include <linux/cache.h> #include <linux/of_platform.h> #include <linux/dma-mapping.h> +#include <linux/cpu.h> #include <asm/cacheflush.h> #include <asm/entry.h> #include <asm/cpuinfo.h> @@ -226,5 +227,23 @@ static int __init setup_bus_notifier(void) return 0; } - arch_initcall(setup_bus_notifier); + +static DEFINE_PER_CPU(struct cpu, cpu_devices); + +static int __init topology_init(void) +{ + int i, ret; + + for_each_present_cpu(i) { + struct cpu *c = &per_cpu(cpu_devices, i); + + ret = register_cpu(c, i); + if (ret) + printk(KERN_WARNING "topology_init: register_cpu %d " + "failed (%d)\n", i, ret); + } + + return 0; +} +subsys_initcall(topology_init); |