diff mbox series

[16/21] x86/topology: convert to use arch_cpu_is_hotpluggable()

Message ID E1r5R3w-00Cszy-6k@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-fixes-PR fail merge-conflict
conchuod/vmtest-for-next-PR warning PR summary
conchuod/patch-16-test-1 success .github/scripts/patches/build_rv32_defconfig.sh
conchuod/patch-16-test-2 success .github/scripts/patches/build_rv64_clang_allmodconfig.sh
conchuod/patch-16-test-3 success .github/scripts/patches/build_rv64_gcc_allmodconfig.sh
conchuod/patch-16-test-4 success .github/scripts/patches/build_rv64_nommu_k210_defconfig.sh
conchuod/patch-16-test-5 success .github/scripts/patches/build_rv64_nommu_virt_defconfig.sh
conchuod/patch-16-test-6 success .github/scripts/patches/checkpatch.sh
conchuod/patch-16-test-7 success .github/scripts/patches/dtb_warn_rv64.sh
conchuod/patch-16-test-8 success .github/scripts/patches/header_inline.sh
conchuod/patch-16-test-9 success .github/scripts/patches/kdoc.sh
conchuod/patch-16-test-10 success .github/scripts/patches/module_param.sh
conchuod/patch-16-test-11 success .github/scripts/patches/verify_fixes.sh
conchuod/patch-16-test-12 success .github/scripts/patches/verify_signedoff.sh

Commit Message

Russell King (Oracle) Nov. 21, 2023, 1:45 p.m. UTC
Convert x86 to use the arch_cpu_is_hotpluggable() helper rather than
arch_register_cpu().

Reviewed-by: Gavin Shan <gshan@redhat.com>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
---
 arch/x86/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:12 +0000
"Russell King (Oracle)" <rmk+kernel@armlinux.org.uk> wrote:

> Convert x86 to use the arch_cpu_is_hotpluggable() helper rather than
> arch_register_cpu().
> 
> 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/x86/kernel/topology.c b/arch/x86/kernel/topology.c
index 211863cb5b81..d42c28b8bfd8 100644
--- a/arch/x86/kernel/topology.c
+++ b/arch/x86/kernel/topology.c
@@ -36,11 +36,8 @@ 
 #include <asm/cpu.h>
 
 #ifdef CONFIG_HOTPLUG_CPU
-int arch_register_cpu(int cpu)
+bool arch_cpu_is_hotpluggable(int cpu)
 {
-	struct cpu *c = per_cpu_ptr(&cpu_devices, cpu);
-
-	c->hotpluggable = cpu > 0;
-	return register_cpu(c, cpu);
+	return cpu > 0;
 }
 #endif /* CONFIG_HOTPLUG_CPU */