From 95ac706744de78a93a7ec98d603c35fb21de8400 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Tue, 3 Aug 2021 16:16:12 +0200 Subject: 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 Signed-off-by: Rafael J. Wysocki --- drivers/acpi/acpi_processor.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'drivers/acpi/acpi_processor.c') 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)); -- cgit v1.2.3