Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

sgi-xpc: Replace deprecated CPU-hotplug functions.

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 <robinmholt@gmail.com>
Cc: Steve Wahl <steve.wahl@hpe.com>
Cc: Mike Travis <mike.travis@hpe.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Link: https://lore.kernel.org/r/20210803141621.780504-17-bigeasy@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Sebastian Andrzej Siewior and committed by
Greg Kroah-Hartman
e67adaa1 1ae14df5

+4 -4
+4 -4
drivers/misc/sgi-xp/xpc_uv.c
··· 1742 1742 { 1743 1743 int cpu; 1744 1744 1745 - get_online_cpus(); 1745 + cpus_read_lock(); 1746 1746 1747 1747 for_each_cpu(cpu, cpumask_of_node(nid)) { 1748 1748 xpc_activate_mq_uv = ··· 1753 1753 break; 1754 1754 } 1755 1755 if (IS_ERR(xpc_activate_mq_uv)) { 1756 - put_online_cpus(); 1756 + cpus_read_unlock(); 1757 1757 return PTR_ERR(xpc_activate_mq_uv); 1758 1758 } 1759 1759 ··· 1767 1767 } 1768 1768 if (IS_ERR(xpc_notify_mq_uv)) { 1769 1769 xpc_destroy_gru_mq_uv(xpc_activate_mq_uv); 1770 - put_online_cpus(); 1770 + cpus_read_unlock(); 1771 1771 return PTR_ERR(xpc_notify_mq_uv); 1772 1772 } 1773 1773 1774 - put_online_cpus(); 1774 + cpus_read_unlock(); 1775 1775 return 0; 1776 1776 } 1777 1777