diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2016-02-26 13:43:28 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2016-03-01 14:36:54 -0500 |
commit | cff7d378d3fdbb53db9b6e2578b14855f401cd41 (patch) | |
tree | 2a81d3627fa3bd7397f89e0998c2cf4141f2e8a4 /init/main.c | |
parent | 5ba9ac8e2c45ab165e5b4a246f4821d319656e9d (diff) |
cpu/hotplug: Convert to a state machine for the control processor
Move the split out steps into a callback array and let the cpu_up/down
code iterate through the array functions. For now most of the
callbacks are asymmetric to resemble the current hotplug maze.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-arch@vger.kernel.org
Cc: Rik van Riel <riel@redhat.com>
Cc: Rafael Wysocki <rafael.j.wysocki@intel.com>
Cc: "Srivatsa S. Bhat" <srivatsa@mit.edu>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: Sebastian Siewior <bigeasy@linutronix.de>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Paul McKenney <paulmck@linux.vnet.ibm.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Paul Turner <pjt@google.com>
Link: http://lkml.kernel.org/r/20160226182340.671816690@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'init/main.c')
-rw-r--r-- | init/main.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/init/main.c b/init/main.c index 58c9e374704b..c2ea72362ee3 100644 --- a/init/main.c +++ b/init/main.c | |||
@@ -452,20 +452,6 @@ void __init parse_early_param(void) | |||
452 | done = 1; | 452 | done = 1; |
453 | } | 453 | } |
454 | 454 | ||
455 | /* | ||
456 | * Activate the first processor. | ||
457 | */ | ||
458 | |||
459 | static void __init boot_cpu_init(void) | ||
460 | { | ||
461 | int cpu = smp_processor_id(); | ||
462 | /* Mark the boot cpu "present", "online" etc for SMP and UP case */ | ||
463 | set_cpu_online(cpu, true); | ||
464 | set_cpu_active(cpu, true); | ||
465 | set_cpu_present(cpu, true); | ||
466 | set_cpu_possible(cpu, true); | ||
467 | } | ||
468 | |||
469 | void __init __weak smp_setup_processor_id(void) | 455 | void __init __weak smp_setup_processor_id(void) |
470 | { | 456 | { |
471 | } | 457 | } |
@@ -530,6 +516,7 @@ asmlinkage __visible void __init start_kernel(void) | |||
530 | setup_command_line(command_line); | 516 | setup_command_line(command_line); |
531 | setup_nr_cpu_ids(); | 517 | setup_nr_cpu_ids(); |
532 | setup_per_cpu_areas(); | 518 | setup_per_cpu_areas(); |
519 | boot_cpu_state_init(); | ||
533 | smp_prepare_boot_cpu(); /* arch-specific boot-cpu hooks */ | 520 | smp_prepare_boot_cpu(); /* arch-specific boot-cpu hooks */ |
534 | 521 | ||
535 | build_all_zonelists(NULL, NULL); | 522 | build_all_zonelists(NULL, NULL); |