[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <E1qvJB0-00AqRe-H9@rmk-PC.armlinux.org.uk>
Date: Tue, 24 Oct 2023 16:18:38 +0100
From: Russell King (Oracle) <rmk+kernel@...linux.org.uk>
To: linux-pm@...r.kernel.org, loongarch@...ts.linux.dev,
linux-acpi@...r.kernel.org, linux-arch@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-riscv@...ts.infradead.org, kvmarm@...ts.linux.dev,
x86@...nel.org, linux-csky@...r.kernel.org,
linux-doc@...r.kernel.org, linux-ia64@...r.kernel.org,
linux-parisc@...r.kernel.org
Cc: Salil Mehta <salil.mehta@...wei.com>,
Jean-Philippe Brucker <jean-philippe@...aro.org>,
jianyong.wu@....com, justin.he@....com,
James Morse <james.morse@....com>,
Huacai Chen <chenhuacai@...nel.org>,
WANG Xuerui <kernel@...0n.name>
Subject: [PATCH 29/39] LoongArch: Use the __weak version of
arch_unregister_cpu()
From: James Morse <james.morse@....com>
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@....com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@...wei.com>
Reviewed-by: Gavin Shan <gshan@...hat.com>
Signed-off-by: Russell King (Oracle) <rmk+kernel@...linux.org.uk>
---
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 bf58351beac1..b595edbfdbcd 100644
--- a/arch/loongarch/kernel/topology.c
+++ b/arch/loongarch/kernel/topology.c
@@ -19,13 +19,4 @@ int arch_register_cpu(int cpu)
return register_cpu(c, cpu);
}
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
Powered by blists - more mailing lists