The functions get_online_cpus() and put_online_cpus() have been
deprecated during the CPU hotplug rework. They map directly to
cpus_read_lock() and cpus_read_unlock().
Replace deprecated CPU-hotplug functions with the official version.
The behavior remains unchanged.
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: linux-mips@vger.kernel.org
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
if (copy_from_user(&new_mask, user_mask_ptr, sizeof(new_mask)))
return -EFAULT;
if (copy_from_user(&new_mask, user_mask_ptr, sizeof(new_mask)))
return -EFAULT;
rcu_read_lock();
p = find_process_by_pid(pid);
if (!p) {
rcu_read_unlock();
rcu_read_lock();
p = find_process_by_pid(pid);
if (!p) {
rcu_read_unlock();
free_cpumask_var(cpus_allowed);
out_put_task:
put_task_struct(p);
free_cpumask_var(cpus_allowed);
out_put_task:
put_task_struct(p);
if (len < real_len)
return -EINVAL;
if (len < real_len)
return -EINVAL;
rcu_read_lock();
retval = -ESRCH;
rcu_read_lock();
retval = -ESRCH;
out_unlock:
rcu_read_unlock();
out_unlock:
rcu_read_unlock();
if (retval)
return retval;
if (copy_to_user(user_mask_ptr, &mask, real_len))
if (retval)
return retval;
if (copy_to_user(user_mask_ptr, &mask, real_len))
* scheduled in then it will already have picked up the new FP mode
* whilst doing so.
*/
* scheduled in then it will already have picked up the new FP mode
* whilst doing so.
*/
for_each_cpu_and(cpu, &process_cpus, cpu_online_mask)
work_on_cpu(cpu, prepare_for_fp_mode_switch, NULL);
for_each_cpu_and(cpu, &process_cpus, cpu_online_mask)
work_on_cpu(cpu, prepare_for_fp_mode_switch, NULL);