History

cpu/hotplug: Handle early registration gracefully

We switched the hotplug machinery to smpboot threads. Early registration of hotplug callbacks, i.e. from do_pre_smp_initcalls(), happens before the threads are initialized. Instead of moving the thread init, we simply handle it in the hotplug code itself and invoke the function directly.

Thomas Gleixner committed 10 years ago

Commit 6a4e2451 parent e877bde1 file · +7 −0Browse files

Unified · Split

kernel/cpu.c+7−0
@@ -517,6 +517,13 @@ static int cpuhp_invoke_ap_callback(int cpu, enum cpuhp_state state, · 516 unmodified lines
517 if (!cpu_online(cpu))517 if (!cpu_online(cpu))
518 return 0;518 return 0;
519 519
520 /*
521 * If we are up and running, use the hotplug thread. For early calls
522 * we invoke the thread function directly.
523 */
524 if (!st->thread)
525 return cpuhp_invoke_callback(cpu, state, cb);
526
520 st->cb_state = state;527 st->cb_state = state;
521 st->cb = cb;528 st->cb = cb;
522 /*529 /*