Skip to content

Commit

Permalink
sgi-xpc: Replace deprecated CPU-hotplug functions.
Browse files Browse the repository at this point in the history
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: Robin Holt <[email protected]>
Cc: Steve Wahl <[email protected]>
Cc: Mike Travis <[email protected]>
Cc: Arnd Bergmann <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
Sebastian Andrzej Siewior authored and gregkh committed Aug 3, 2021
1 parent 1ae14df commit e67adaa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/misc/sgi-xp/xpc_uv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1742,7 +1742,7 @@ xpc_init_mq_node(int nid)
{
int cpu;

get_online_cpus();
cpus_read_lock();

for_each_cpu(cpu, cpumask_of_node(nid)) {
xpc_activate_mq_uv =
Expand All @@ -1753,7 +1753,7 @@ xpc_init_mq_node(int nid)
break;
}
if (IS_ERR(xpc_activate_mq_uv)) {
put_online_cpus();
cpus_read_unlock();
return PTR_ERR(xpc_activate_mq_uv);
}

Expand All @@ -1767,11 +1767,11 @@ xpc_init_mq_node(int nid)
}
if (IS_ERR(xpc_notify_mq_uv)) {
xpc_destroy_gru_mq_uv(xpc_activate_mq_uv);
put_online_cpus();
cpus_read_unlock();
return PTR_ERR(xpc_notify_mq_uv);
}

put_online_cpus();
cpus_read_unlock();
return 0;
}

Expand Down

0 comments on commit e67adaa

Please sign in to comment.