提交 52b6defa 编写于 作者: S Sebastian Andrzej Siewior 提交者: Heiko Carstens

s390/sclp: 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.
Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
Link: https://lore.kernel.org/r/20210803141621.780504-6-bigeasy@linutronix.deSigned-off-by: NHeiko Carstens <hca@linux.ibm.com>
上级 a73de293
...@@ -50,12 +50,12 @@ static void sclp_cpu_capability_notify(struct work_struct *work) ...@@ -50,12 +50,12 @@ static void sclp_cpu_capability_notify(struct work_struct *work)
s390_update_cpu_mhz(); s390_update_cpu_mhz();
pr_info("CPU capability may have changed\n"); pr_info("CPU capability may have changed\n");
get_online_cpus(); cpus_read_lock();
for_each_online_cpu(cpu) { for_each_online_cpu(cpu) {
dev = get_cpu_device(cpu); dev = get_cpu_device(cpu);
kobject_uevent(&dev->kobj, KOBJ_CHANGE); kobject_uevent(&dev->kobj, KOBJ_CHANGE);
} }
put_online_cpus(); cpus_read_unlock();
} }
static void __ref sclp_cpu_change_notify(struct work_struct *work) static void __ref sclp_cpu_change_notify(struct work_struct *work)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册