LoongArch: convert to use arch_cpu_is_hotpluggable()
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Tue, 21 Nov 2023 13:45:27 +0000 (13:45 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 6 Dec 2023 03:41:50 +0000 (12:41 +0900)
Convert loongarch to use the arch_cpu_is_hotpluggable() helper rather
than arch_register_cpu(). Also remove the export as nothing should be
using arch_register_cpu() outside of the core kernel/acpi code.

Reviewed-by: Gavin Shan <gshan@redhat.com>
Signed-off-by: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/E1r5R4B-00Ct0G-Kk@rmk-PC.armlinux.org.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/loongarch/kernel/topology.c

index 866c2c9ef6ab2a3d935639fbce44f9aad1a767d8..75d5c51a7cd3def4227a3777625abecca37c8ede 100644 (file)
 #include <acpi/processor.h>
 
 #ifdef CONFIG_HOTPLUG_CPU
-int arch_register_cpu(int cpu)
+bool arch_cpu_is_hotpluggable(int cpu)
 {
-       struct cpu *c = &per_cpu(cpu_devices, cpu);
-
-       c->hotpluggable = !io_master(cpu);
-       return register_cpu(c, cpu);
+       return !io_master(cpu);
 }
 #endif