X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=init%2Fmain.c;h=0d57f6ccb63a1a7c1f1efd47810727feb40e8ae8;hb=11bcab9071ac204b1ca2bb0514ad1641bc4c280b;hp=2714e0e7cfecb78c45a3f6a17bc2d1598ab66f42;hpb=88e3c1da8b3258a81c5c81d4e7e22557b7d71ba7;p=powerpc.git diff --git a/init/main.c b/init/main.c index 2714e0e7cf..0d57f6ccb6 100644 --- a/init/main.c +++ b/init/main.c @@ -47,6 +47,8 @@ #include #include #include +#include +#include #include #include @@ -79,7 +81,6 @@ extern void mca_init(void); extern void sbus_init(void); extern void sysctl_init(void); extern void signals_init(void); -extern void buffer_init(void); extern void pidhash_init(void); extern void pidmap_init(void); extern void prio_tree_init(void); @@ -306,8 +307,6 @@ static int __init rdinit_setup(char *str) } __setup("rdinit=", rdinit_setup); -extern void setup_arch(char **); - #ifndef CONFIG_SMP #ifdef CONFIG_X86_LOCAL_APIC @@ -343,7 +342,7 @@ static void __init setup_per_cpu_areas(void) #endif ptr = alloc_bootmem(size * nr_possible_cpus); - for_each_cpu(i) { + for_each_possible_cpu(i) { __per_cpu_offset[i] = ptr - __per_cpu_start; memcpy(ptr, __per_cpu_start, __per_cpu_end - __per_cpu_start); ptr += size; @@ -484,6 +483,7 @@ asmlinkage void __init start_kernel(void) __stop___param - __start___param, &unknown_bootoption); sort_main_extable(); + unwind_init(); trap_init(); rcu_init(); init_IRQ(); @@ -492,6 +492,7 @@ asmlinkage void __init start_kernel(void) hrtimers_init(); softirq_init(); time_init(); + timekeeping_init(); /* * HACK ALERT! This is early. We're enabling the console before @@ -571,17 +572,23 @@ static void __init do_initcalls(void) int count = preempt_count(); for (call = __initcall_start; call < __initcall_end; call++) { - char *msg; + char *msg = NULL; + char msgbuf[40]; + int result; if (initcall_debug) { - printk(KERN_DEBUG "Calling initcall 0x%p", *call); - print_fn_descriptor_symbol(": %s()", (unsigned long) *call); + printk("Calling initcall 0x%p", *call); + print_fn_descriptor_symbol(": %s()", + (unsigned long) *call); printk("\n"); } - (*call)(); + result = (*call)(); - msg = NULL; + if (result && result != -ENODEV && initcall_debug) { + sprintf(msgbuf, "error code %d", result); + msg = msgbuf; + } if (preempt_count() != count) { msg = "preemption imbalance"; preempt_count() = count; @@ -591,8 +598,10 @@ static void __init do_initcalls(void) local_irq_enable(); } if (msg) { - printk(KERN_WARNING "error in initcall at 0x%p: " - "returned with %s\n", *call, msg); + printk(KERN_WARNING "initcall at 0x%p", *call); + print_fn_descriptor_symbol(": %s()", + (unsigned long) *call); + printk(": returned with %s\n", msg); } } @@ -639,24 +648,6 @@ static void run_init_process(char *init_filename) execve(init_filename, argv_init, envp_init); } -static inline void fixup_cpu_present_map(void) -{ -#ifdef CONFIG_SMP - int i; - - /* - * If arch is not hotplug ready and did not populate - * cpu_present_map, just make cpu_present_map same as cpu_possible_map - * for other cpu bringup code to function as normal. e.g smp_init() etc. - */ - if (cpus_empty(cpu_present_map)) { - for_each_cpu(i) { - cpu_set(i, cpu_present_map); - } - } -#endif -} - static int init(void * unused) { lock_kernel(); @@ -678,7 +669,6 @@ static int init(void * unused) do_pre_smp_initcalls(); - fixup_cpu_present_map(); smp_init(); sched_init_smp();