aboutsummaryrefslogtreecommitdiffstats
path: root/init/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'init/main.c')
-rw-r--r--init/main.c22
1 files changed, 4 insertions, 18 deletions
diff --git a/init/main.c b/init/main.c
index f5e64f20d2b0..cd168ebc5924 100644
--- a/init/main.c
+++ b/init/main.c
@@ -75,15 +75,6 @@
75#include <asm/smp.h> 75#include <asm/smp.h>
76#endif 76#endif
77 77
78/*
79 * This is one of the first .c files built. Error out early if we have compiler
80 * trouble.
81 */
82
83#if __GNUC__ == 4 && __GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ == 0
84#warning gcc-4.1.0 is known to miscompile the kernel. A different compiler version is recommended.
85#endif
86
87static int kernel_init(void *); 78static int kernel_init(void *);
88 79
89extern void init_IRQ(void); 80extern void init_IRQ(void);
@@ -380,12 +371,7 @@ EXPORT_SYMBOL(nr_cpu_ids);
380/* An arch may set nr_cpu_ids earlier if needed, so this would be redundant */ 371/* An arch may set nr_cpu_ids earlier if needed, so this would be redundant */
381static void __init setup_nr_cpu_ids(void) 372static void __init setup_nr_cpu_ids(void)
382{ 373{
383 int cpu, highest_cpu = 0; 374 nr_cpu_ids = find_last_bit(cpumask_bits(cpu_possible_mask),NR_CPUS) + 1;
384
385 for_each_possible_cpu(cpu)
386 highest_cpu = cpu;
387
388 nr_cpu_ids = highest_cpu + 1;
389} 375}
390 376
391#ifndef CONFIG_HAVE_SETUP_PER_CPU_AREA 377#ifndef CONFIG_HAVE_SETUP_PER_CPU_AREA
@@ -527,9 +513,9 @@ static void __init boot_cpu_init(void)
527{ 513{
528 int cpu = smp_processor_id(); 514 int cpu = smp_processor_id();
529 /* Mark the boot cpu "present", "online" etc for SMP and UP case */ 515 /* Mark the boot cpu "present", "online" etc for SMP and UP case */
530 cpu_set(cpu, cpu_online_map); 516 set_cpu_online(cpu, true);
531 cpu_set(cpu, cpu_present_map); 517 set_cpu_present(cpu, true);
532 cpu_set(cpu, cpu_possible_map); 518 set_cpu_possible(cpu, true);
533} 519}
534 520
535void __init __weak smp_setup_processor_id(void) 521void __init __weak smp_setup_processor_id(void)