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

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: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Link: https://lore.kernel.org/r/20210803141621.780504-6-bigeasy@linutronix.de
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>

authored by

Sebastian Andrzej Siewior and committed by
Heiko Carstens
52b6defa a73de293

+2 -2
+2 -2
drivers/s390/char/sclp_config.c
··· 50 50 51 51 s390_update_cpu_mhz(); 52 52 pr_info("CPU capability may have changed\n"); 53 - get_online_cpus(); 53 + cpus_read_lock(); 54 54 for_each_online_cpu(cpu) { 55 55 dev = get_cpu_device(cpu); 56 56 kobject_uevent(&dev->kobj, KOBJ_CHANGE); 57 57 } 58 - put_online_cpus(); 58 + cpus_read_unlock(); 59 59 } 60 60 61 61 static void __ref sclp_cpu_change_notify(struct work_struct *work)