Commit 2b17fa50 authored by Rusty Russell's avatar Rusty Russell

cpumask: use set_cpu_active in init/main.c

cpu_active_map is deprecated in favor of cpu_active_mask, which is
const for safety: we use accessors now (set_cpu_active) is we really
want to make a change.
Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
parent 0451fb2e
...@@ -407,8 +407,7 @@ static void __init smp_init(void) ...@@ -407,8 +407,7 @@ static void __init smp_init(void)
* Set up the current CPU as possible to migrate to. * Set up the current CPU as possible to migrate to.
* The other ones will be done by cpu_up/cpu_down() * The other ones will be done by cpu_up/cpu_down()
*/ */
cpu = smp_processor_id(); set_cpu_active(smp_processor_id(), true);
cpu_set(cpu, cpu_active_map);
/* FIXME: This should be done in userspace --RR */ /* FIXME: This should be done in userspace --RR */
for_each_present_cpu(cpu) { for_each_present_cpu(cpu) {
......
...@@ -281,7 +281,7 @@ int __ref cpu_down(unsigned int cpu) ...@@ -281,7 +281,7 @@ int __ref cpu_down(unsigned int cpu)
goto out; goto out;
} }
cpu_clear(cpu, cpu_active_map); set_cpu_active(cpu, false);
/* /*
* Make sure the all cpus did the reschedule and are not * Make sure the all cpus did the reschedule and are not
...@@ -296,7 +296,7 @@ int __ref cpu_down(unsigned int cpu) ...@@ -296,7 +296,7 @@ int __ref cpu_down(unsigned int cpu)
err = _cpu_down(cpu, 0); err = _cpu_down(cpu, 0);
if (cpu_online(cpu)) if (cpu_online(cpu))
cpu_set(cpu, cpu_active_map); set_cpu_active(cpu, true);
out: out:
cpu_maps_update_done(); cpu_maps_update_done();
...@@ -333,7 +333,7 @@ static int __cpuinit _cpu_up(unsigned int cpu, int tasks_frozen) ...@@ -333,7 +333,7 @@ static int __cpuinit _cpu_up(unsigned int cpu, int tasks_frozen)
goto out_notify; goto out_notify;
BUG_ON(!cpu_online(cpu)); BUG_ON(!cpu_online(cpu));
cpu_set(cpu, cpu_active_map); set_cpu_active(cpu, true);
/* Now call notifier in preparation. */ /* Now call notifier in preparation. */
raw_notifier_call_chain(&cpu_chain, CPU_ONLINE | mod, hcpu); raw_notifier_call_chain(&cpu_chain, CPU_ONLINE | mod, hcpu);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment