summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpi_processor.c
diff options
context:
space:
mode:
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>2021-08-03 16:16:12 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2021-08-04 20:25:54 +0200
commit95ac706744de78a93a7ec98d603c35fb21de8400 (patch)
tree34a790da9aedbcd9341fc2e93ea9b7d00bfc654f /drivers/acpi/acpi_processor.c
parentLinux 5.14-rc4 (diff)
downloadlinux-95ac706744de78a93a7ec98d603c35fb21de8400.tar.xz
linux-95ac706744de78a93a7ec98d603c35fb21de8400.zip
ACPI: processor: Replace deprecated CPU-hotplug functions
The functions cpu_hotplug_begin, cpu_hotplug_done, get_online_cpus() and put_online_cpus() have been deprecated during the CPU hotplug rework. They map directly to cpus_write_lock(), cpus_write_unlock, 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> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/acpi_processor.c')
-rw-r--r--drivers/acpi/acpi_processor.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/acpi/acpi_processor.c b/drivers/acpi/acpi_processor.c
index 2d5bd2a6ddce..6737b1cbf6d6 100644
--- a/drivers/acpi/acpi_processor.c
+++ b/drivers/acpi/acpi_processor.c
@@ -182,7 +182,7 @@ static int acpi_processor_hotadd_init(struct acpi_processor *pr)
return -ENODEV;
cpu_maps_update_begin();
- cpu_hotplug_begin();
+ cpus_write_lock();
ret = acpi_map_cpu(pr->handle, pr->phys_id, pr->acpi_id, &pr->id);
if (ret)
@@ -203,7 +203,7 @@ static int acpi_processor_hotadd_init(struct acpi_processor *pr)
pr->flags.need_hotplug_init = 1;
out:
- cpu_hotplug_done();
+ cpus_write_unlock();
cpu_maps_update_done();
return ret;
}
@@ -454,13 +454,13 @@ static void acpi_processor_remove(struct acpi_device *device)
per_cpu(processors, pr->id) = NULL;
cpu_maps_update_begin();
- cpu_hotplug_begin();
+ cpus_write_lock();
/* Remove the CPU. */
arch_unregister_cpu(pr->id);
acpi_unmap_cpu(pr->id);
- cpu_hotplug_done();
+ cpus_write_unlock();
cpu_maps_update_done();
try_offline_node(cpu_to_node(pr->id));