aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-01-17 10:49:06 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2012-01-17 10:49:06 -0800
commit8364919c5698d934860aabc607ffd32b13c8c37c (patch)
tree8d11db5c61d442f9bfc4499e56353ac120af6f8b /arch
parentd3569d163cba40f9c5682df083dbed3f049478a4 (diff)
parent7f788ec07d169123bb1bd14e6221a2b228079ce8 (diff)
downloadlinux-linaro-stable-8364919c5698d934860aabc607ffd32b13c8c37c.tar.gz
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')
-rw-r--r--arch/microblaze/kernel/setup.c21
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);