diff options
Diffstat (limited to 'init')
-rw-r--r-- | init/main.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/init/main.c b/init/main.c index 4c194c47395f..141e8896d252 100644 --- a/init/main.c +++ b/init/main.c | |||
@@ -438,6 +438,15 @@ void __init parse_early_param(void) | |||
438 | * Activate the first processor. | 438 | * Activate the first processor. |
439 | */ | 439 | */ |
440 | 440 | ||
441 | static void __init boot_cpu_init(void) | ||
442 | { | ||
443 | int cpu = smp_processor_id(); | ||
444 | /* Mark the boot cpu "present", "online" etc for SMP and UP case */ | ||
445 | cpu_set(cpu, cpu_online_map); | ||
446 | cpu_set(cpu, cpu_present_map); | ||
447 | cpu_set(cpu, cpu_possible_map); | ||
448 | } | ||
449 | |||
441 | asmlinkage void __init start_kernel(void) | 450 | asmlinkage void __init start_kernel(void) |
442 | { | 451 | { |
443 | char * command_line; | 452 | char * command_line; |
@@ -447,17 +456,13 @@ asmlinkage void __init start_kernel(void) | |||
447 | * enable them | 456 | * enable them |
448 | */ | 457 | */ |
449 | lock_kernel(); | 458 | lock_kernel(); |
459 | boot_cpu_init(); | ||
450 | page_address_init(); | 460 | page_address_init(); |
451 | printk(KERN_NOTICE); | 461 | printk(KERN_NOTICE); |
452 | printk(linux_banner); | 462 | printk(linux_banner); |
453 | setup_arch(&command_line); | 463 | setup_arch(&command_line); |
454 | setup_per_cpu_areas(); | 464 | setup_per_cpu_areas(); |
455 | 465 | smp_prepare_boot_cpu(); /* arch-specific boot-cpu hooks */ | |
456 | /* | ||
457 | * Mark the boot cpu "online" so that it can call console drivers in | ||
458 | * printk() and can access its per-cpu storage. | ||
459 | */ | ||
460 | smp_prepare_boot_cpu(); | ||
461 | 466 | ||
462 | /* | 467 | /* |
463 | * Set up the scheduler prior starting any interrupts (such as the | 468 | * Set up the scheduler prior starting any interrupts (such as the |