[RFC PATCH 21/32] LoongArch: Use the __weak version of arch_unregister_cpu()
James Morse
james.morse at arm.com
Fri Feb 3 05:50:32 PST 2023
LoongArch provides its own arch_unregister_cpu(). This clears the
hotpluggable flag, then unregisters the CPU.
It isn't necessary to clear the hotpluggable flag when unregistering
a cpu. unregister_cpu() writes NULL to the percpu cpu_sys_devices
pointer, meaning cpu_is_hotpluggable() will return false, as
get_cpu_device() has returned NULL.
Remove arch_unregister_cpu() and use the __weak version.
Signed-off-by: James Morse <james.morse at arm.com>
---
arch/loongarch/kernel/topology.c | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/arch/loongarch/kernel/topology.c b/arch/loongarch/kernel/topology.c
index a86d51269b09..494044990ba9 100644
--- a/arch/loongarch/kernel/topology.c
+++ b/arch/loongarch/kernel/topology.c
@@ -21,13 +21,4 @@ int arch_register_cpu(int cpu)
return ret;
}
EXPORT_SYMBOL(arch_register_cpu);
-
-void arch_unregister_cpu(int cpu)
-{
- struct cpu *c = &per_cpu(cpu_devices, cpu);
-
- c->hotpluggable = 0;
- unregister_cpu(c);
-}
-EXPORT_SYMBOL(arch_unregister_cpu);
#endif
--
2.30.2
More information about the linux-arm-kernel
mailing list