summaryrefslogtreecommitdiffstats
path: root/kernel/cpu.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2016-03-10 12:54:13 +0100
committerThomas Gleixner <tglx@linutronix.de>2016-05-06 14:58:24 +0200
commit40190a78f85fec29f0fdd21f6b4415712085711e (patch)
tree361bbb6d81e35ac5bd4783926aabf7394de85dd4 /kernel/cpu.c
parentc6d2c7475ced868cfc636cd5a55a428da94537c3 (diff)
downloadop-kernel-dev-40190a78f85fec29f0fdd21f6b4415712085711e.zip
op-kernel-dev-40190a78f85fec29f0fdd21f6b4415712085711e.tar.gz
sched/hotplug: Convert cpu_[in]active notifiers to state machine
Now that we reduced everything into single notifiers, it's simple to move them into the hotplug state machine space. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Peter Zijlstra <peterz@infradead.org> Cc: rt@linutronix.de Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/cpu.c')
-rw-r--r--kernel/cpu.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/kernel/cpu.c b/kernel/cpu.c
index f46d02b..15402b7 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -923,8 +923,6 @@ void cpuhp_online_idle(enum cpuhp_state state)
st->state = CPUHP_AP_ONLINE_IDLE;
- /* The cpu is marked online, set it active now */
- set_cpu_active(cpu, true);
/* Unpark the stopper thread and the hotplug thread of this cpu */
stop_machine_unpark(cpu);
kthread_unpark(st->thread);
@@ -1259,6 +1257,12 @@ static struct cpuhp_step cpuhp_ap_states[] = {
[CPUHP_AP_ONLINE] = {
.name = "ap:online",
},
+ /* First state is scheduler control. Interrupts are enabled */
+ [CPUHP_AP_ACTIVE] = {
+ .name = "sched:active",
+ .startup = sched_cpu_activate,
+ .teardown = sched_cpu_deactivate,
+ },
/* Handle smpboot threads park/unpark */
[CPUHP_AP_SMPBOOT_THREADS] = {
.name = "smpboot:threads",
OpenPOWER on IntegriCloud