Skip to content

Commit

Permalink
um: fix up obsolete cpu function usage.
Browse files Browse the repository at this point in the history
Thanks to spatch.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Richard Weinberger <richard@nod.at>
Cc: user-mode-linux-devel@lists.sourceforge.net
  • Loading branch information
Rusty Russell committed Mar 5, 2015
1 parent 5d2068d commit b09fcc9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions arch/um/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@ static int idle_proc(void *cpup)
os_set_fd_async(cpu_data[cpu].ipi_pipe[0]);

wmb();
if (cpu_test_and_set(cpu, cpu_callin_map)) {
if (cpumask_test_and_set_cpu(cpu, &cpu_callin_map)) {
printk(KERN_ERR "huh, CPU#%d already present??\n", cpu);
BUG();
}

while (!cpu_isset(cpu, smp_commenced_mask))
while (!cpumask_test_cpu(cpu, &smp_commenced_mask))
cpu_relax();

notify_cpu_starting(cpu);
Expand Down Expand Up @@ -111,7 +111,7 @@ void smp_prepare_cpus(unsigned int maxcpus)
set_cpu_possible(i, true);

set_cpu_online(me, true);
cpu_set(me, cpu_callin_map);
cpumask_set_cpu(me, &cpu_callin_map);

err = os_pipe(cpu_data[me].ipi_pipe, 1, 1);
if (err < 0)
Expand All @@ -127,11 +127,11 @@ void smp_prepare_cpus(unsigned int maxcpus)
init_idle(idle, cpu);

waittime = 200000000;
while (waittime-- && !cpu_isset(cpu, cpu_callin_map))
while (waittime-- && !cpumask_test_cpu(cpu, &cpu_callin_map))
cpu_relax();

printk(KERN_INFO "%s\n",
cpu_isset(cpu, cpu_calling_map) ? "done" : "failed");
cpumask_test_cpu(cpu, &cpu_calling_map) ? "done" : "failed");
}
}

Expand All @@ -142,7 +142,7 @@ void smp_prepare_boot_cpu(void)

int __cpu_up(unsigned int cpu, struct task_struct *tidle)
{
cpu_set(cpu, smp_commenced_mask);
cpumask_set_cpu(cpu, &smp_commenced_mask);
while (!cpu_online(cpu))
mb();
return 0;
Expand Down

0 comments on commit b09fcc9

Please sign in to comment.