X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=init%2Fmain.c;h=f715b9b897538cb04dc94fa900bd8c3f5d6e26e7;hb=92445eaaadc1f03f5a177ecc957bda76bf2ba8d5;hp=006dcd547dc2e72bd3280ac31e746d34da1970bf;hpb=368d17e068f691dba5a4f122c271db5ec9b2ebd6;p=linux-2.6 diff --git a/init/main.c b/init/main.c index 006dcd547d..f715b9b897 100644 --- a/init/main.c +++ b/init/main.c @@ -341,7 +341,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; @@ -582,7 +582,7 @@ static void __init do_initcalls(void) result = (*call)(); - if (result && (result != -ENODEV || initcall_debug)) { + if (result && result != -ENODEV && initcall_debug) { sprintf(msgbuf, "error code %d", result); msg = msgbuf; } @@ -645,24 +645,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(); @@ -684,7 +666,6 @@ static int init(void * unused) do_pre_smp_initcalls(); - fixup_cpu_present_map(); smp_init(); sched_init_smp();