X-Git-Url: https://git.stricted.de/?a=blobdiff_plain;f=kernel%2Fcpu.c;h=a6c2424898618ed3d436380362ea8b19d994083a;hb=57bf12f43e0151395114768d343b64429ac7650f;hp=198a38883e64a0616437401ef2692f5b3c9029a5;hpb=b2cc9c19e48bcf00f10c23fbf9f6abe43f6929d5;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git diff --git a/kernel/cpu.c b/kernel/cpu.c index 198a38883e64..a6c242489861 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c @@ -185,8 +185,6 @@ static int cpu_notify(unsigned long val, void *v) return __cpu_notify(val, v, -1, NULL); } -#ifdef CONFIG_HOTPLUG_CPU - static void cpu_notify_nofail(unsigned long val, void *v) { BUG_ON(cpu_notify(val, v)); @@ -201,6 +199,7 @@ void __ref unregister_cpu_notifier(struct notifier_block *nb) } EXPORT_SYMBOL(unregister_cpu_notifier); +#ifdef CONFIG_HOTPLUG_CPU /** * clear_tasks_mm_cpumask - Safely clear tasks' mm_cpumask for a CPU * @cpu: a CPU id @@ -698,10 +697,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)