History

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.

Rusty Russell committed 17 years ago

Commit 2b17fa51 parent 0451fb22 files · +4 −5Browse files

Unified · Split

2 files
  1. init/main.c +1 −2
  2. kernel/cpu.c +3 −3
init/main.c+1−2
@@ -407,8 +407,7 @@ static void __init smp_init(void) · 406 unmodified lines
407407 * Set up the current CPU as possible to migrate to.
408408 * The other ones will be done by cpu_up/cpu_down()
409409 */
410− cpu = smp_processor_id();
411− cpu_set(cpu, cpu_active_map);
410+ set_cpu_active(smp_processor_id(), true);
412411
413412 /* FIXME: This should be done in userspace --RR */
414413 for_each_present_cpu(cpu) {
kernel/cpu.c+3−3
@@ -281,7 +281,7 @@ int __ref cpu_down(unsigned int cpu) · 280 unmodified lines
281281 goto out;
282282 }
283283
284− cpu_clear(cpu, cpu_active_map);
284+ set_cpu_active(cpu, false);
285285
286286 /*
287287 * Make sure the all cpus did the reschedule and are not
@@ -296,7 +296,7 @@ int __ref cpu_down(unsigned int cpu) · 8 unmodified lines
296296 err = _cpu_down(cpu, 0);
297297
298298 if (cpu_online(cpu))
299− cpu_set(cpu, cpu_active_map);
299+ set_cpu_active(cpu, true);
300300
301301 out:
302302 cpu_maps_update_done();
@@ -333,7 +333,7 @@ static int __cpuinit _cpu_up(unsigned int cpu, int tasks_frozen) · 30 unmodified lines
333333 goto out_notify;
334334 BUG_ON(!cpu_online(cpu));
335335
336− cpu_set(cpu, cpu_active_map);
336+ set_cpu_active(cpu, true);
337337
338338 /* Now call notifier in preparation. */
339339 raw_notifier_call_chain(&cpu_chain, CPU_ONLINE | mod, hcpu);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t