diff options
-rw-r--r-- | kernel/cpu.c | 6 | ||||
-rw-r--r-- | kernel/sched/core.c | 1 |
2 files changed, 4 insertions, 3 deletions
diff --git a/kernel/cpu.c b/kernel/cpu.c index d7f07a2da5a6..92599d897125 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c @@ -695,10 +695,12 @@ void set_cpu_present(unsigned int cpu, bool present) void set_cpu_online(unsigned int cpu, bool online) { - if (online) + if (online) { cpumask_set_cpu(cpu, to_cpumask(cpu_online_bits)); - else + cpumask_set_cpu(cpu, to_cpumask(cpu_active_bits)); + } else { cpumask_clear_cpu(cpu, to_cpumask(cpu_online_bits)); + } } void set_cpu_active(unsigned int cpu, bool active) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index a494ace683e3..07039cba59d9 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -4726,7 +4726,6 @@ static int sched_cpu_active(struct notifier_block *nfb, unsigned long action, void *hcpu) { switch (action & ~CPU_TASKS_FROZEN) { - case CPU_STARTING: case CPU_DOWN_FAILED: set_cpu_active((long)hcpu, true); return NOTIFY_OK; |