Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fc6d73d6 authored by Thomas Gleixner's avatar Thomas Gleixner
Browse files

arch/hotplug: Call into idle with a proper state



Let the non boot cpus call into idle with the corresponding hotplug state, so
the hotplug core can handle the further bringup. That's a first step to
convert the boot side of the hotplugged cpus to do all the synchronization
with the other side through the state machine. For now it'll only start the
hotplug thread and kick the full bringup of the cpu.

Signed-off-by: default avatarThomas 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/20160226182341.614102639@linutronix.de


Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent 1cf4f629
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -168,7 +168,7 @@ smp_callin(void)
	      cpuid, current, current->active_mm));

	preempt_disable();
	cpu_startup_entry(CPUHP_ONLINE);
	cpu_startup_entry(CPUHP_AP_ONLINE_IDLE);
}

/* Wait until hwrpb->txrdy is clear for cpu.  Return -1 on timeout.  */
+1 −1
Original line number Diff line number Diff line
@@ -142,7 +142,7 @@ void start_kernel_secondary(void)

	local_irq_enable();
	preempt_disable();
	cpu_startup_entry(CPUHP_ONLINE);
	cpu_startup_entry(CPUHP_AP_ONLINE_IDLE);
}

/*
+1 −1
Original line number Diff line number Diff line
@@ -409,7 +409,7 @@ asmlinkage void secondary_start_kernel(void)
	/*
	 * OK, it's off to the idle thread for us
	 */
	cpu_startup_entry(CPUHP_ONLINE);
	cpu_startup_entry(CPUHP_AP_ONLINE_IDLE);
}

void __init smp_cpus_done(unsigned int max_cpus)
+1 −1
Original line number Diff line number Diff line
@@ -195,7 +195,7 @@ asmlinkage void secondary_start_kernel(void)
	/*
	 * OK, it's off to the idle thread for us
	 */
	cpu_startup_entry(CPUHP_ONLINE);
	cpu_startup_entry(CPUHP_AP_ONLINE_IDLE);
}

#ifdef CONFIG_HOTPLUG_CPU
+1 −1
Original line number Diff line number Diff line
@@ -333,7 +333,7 @@ void secondary_start_kernel(void)

	/* We are done with local CPU inits, unblock the boot CPU. */
	set_cpu_online(cpu, true);
	cpu_startup_entry(CPUHP_ONLINE);
	cpu_startup_entry(CPUHP_AP_ONLINE_IDLE);
}

void __init smp_prepare_boot_cpu(void)
Loading