diff options
Diffstat (limited to 'arch/microblaze/kernel/setup.c')
-rw-r--r-- | arch/microblaze/kernel/setup.c | 39 |
1 files changed, 29 insertions, 10 deletions
diff --git a/arch/microblaze/kernel/setup.c b/arch/microblaze/kernel/setup.c index 0e654a12d37e..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> @@ -145,32 +146,32 @@ void __init machine_early_init(const char *cmdline, unsigned int ram, setup_early_printk(NULL); #endif - eprintk("Ramdisk addr 0x%08x, ", ram); + printk("Ramdisk addr 0x%08x, ", ram); if (fdt) - eprintk("FDT at 0x%08x\n", fdt); + printk("FDT at 0x%08x\n", fdt); else - eprintk("Compiled-in FDT at 0x%08x\n", + printk("Compiled-in FDT at 0x%08x\n", (unsigned int)_fdt_start); #ifdef CONFIG_MTD_UCLINUX - eprintk("Found romfs @ 0x%08x (0x%08x)\n", + printk("Found romfs @ 0x%08x (0x%08x)\n", romfs_base, romfs_size); - eprintk("#### klimit %p ####\n", old_klimit); + printk("#### klimit %p ####\n", old_klimit); BUG_ON(romfs_size < 0); /* What else can we do? */ - eprintk("Moved 0x%08x bytes from 0x%08x to 0x%08x\n", + printk("Moved 0x%08x bytes from 0x%08x to 0x%08x\n", romfs_size, romfs_base, (unsigned)&_ebss); - eprintk("New klimit: 0x%08x\n", (unsigned)klimit); + printk("New klimit: 0x%08x\n", (unsigned)klimit); #endif #if CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR if (msr) - eprintk("!!!Your kernel has setup MSR instruction but " + printk("!!!Your kernel has setup MSR instruction but " "CPU don't have it %x\n", msr); #else if (!msr) - eprintk("!!!Your kernel not setup MSR instruction but " + printk("!!!Your kernel not setup MSR instruction but " "CPU have it %x\n", msr); #endif @@ -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); |