diff mbox series

[19/21] LoongArch: convert to use arch_cpu_is_hotpluggable()

Message ID E1r5R4B-00Ct0G-Kk@rmk-PC.armlinux.org.uk (mailing list archive)
State Handled Elsewhere
Headers show
Series Initial cleanups for vCPU hotplug | expand

Checks

Context Check Description
conchuod/vmtest-for-next-PR warning PR summary
conchuod/patch-19-test-1 success .github/scripts/patches/build_rv32_defconfig.sh
conchuod/patch-19-test-2 success .github/scripts/patches/build_rv64_clang_allmodconfig.sh
conchuod/patch-19-test-3 success .github/scripts/patches/build_rv64_gcc_allmodconfig.sh
conchuod/patch-19-test-4 success .github/scripts/patches/build_rv64_nommu_k210_defconfig.sh
conchuod/patch-19-test-5 success .github/scripts/patches/build_rv64_nommu_virt_defconfig.sh
conchuod/patch-19-test-6 success .github/scripts/patches/checkpatch.sh
conchuod/patch-19-test-7 success .github/scripts/patches/dtb_warn_rv64.sh
conchuod/patch-19-test-8 success .github/scripts/patches/header_inline.sh
conchuod/patch-19-test-9 success .github/scripts/patches/kdoc.sh
conchuod/patch-19-test-10 success .github/scripts/patches/module_param.sh
conchuod/patch-19-test-11 success .github/scripts/patches/verify_fixes.sh
conchuod/patch-19-test-12 success .github/scripts/patches/verify_signedoff.sh

Commit Message

Russell King (Oracle) Nov. 21, 2023, 1:45 p.m. UTC
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>
---
 arch/loongarch/kernel/topology.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

Comments

Jonathan Cameron Nov. 30, 2023, 4:55 p.m. UTC | #1
On Tue, 21 Nov 2023 13:45:27 +0000
"Russell King (Oracle)" <rmk+kernel@armlinux.org.uk> wrote:

> 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>
diff mbox series

Patch

diff --git a/arch/loongarch/kernel/topology.c b/arch/loongarch/kernel/topology.c
index 866c2c9ef6ab..75d5c51a7cd3 100644
--- a/arch/loongarch/kernel/topology.c
+++ b/arch/loongarch/kernel/topology.c
@@ -11,11 +11,8 @@ 
 #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