summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/setup.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2024-03-18 19:12:45 +0100
committerIngo Molnar <mingo@kernel.org>2024-03-21 20:47:40 +0100
commitedf66a3c76635a5d326badd83d76fd480a0c8db2 (patch)
tree3e48eeb93284463b69173dac0f1e70f9ead6b764 /arch/x86/kernel/setup.c
parent4ae3dc83b047d51485cce1a72be277a110d77c91 (diff)
downloadlinux-stable-edf66a3c76635a5d326badd83d76fd480a0c8db2.tar.gz
linux-stable-edf66a3c76635a5d326badd83d76fd480a0c8db2.tar.bz2
linux-stable-edf66a3c76635a5d326badd83d76fd480a0c8db2.zip
x86/cpu: Move leftover contents of topology.c to setup.c
The only useful piece of arch/x86/kernel/topology.c is the definition of arch_cpu_is_hotpluggable() that can be moved elsewhere (other architectures tend to put it into setup.c), so do that and delete the rest of the file. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Ingo Molnar <mingo@kernel.org> Link: https://lore.kernel.org/r/12422874.O9o76ZdvQC@kreacher
Diffstat (limited to 'arch/x86/kernel/setup.c')
-rw-r--r--arch/x86/kernel/setup.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index 3e1e96efadfe..d50b258a0290 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -7,6 +7,7 @@
*/
#include <linux/acpi.h>
#include <linux/console.h>
+#include <linux/cpu.h>
#include <linux/crash_dump.h>
#include <linux/dma-map-ops.h>
#include <linux/dmi.h>
@@ -1227,3 +1228,10 @@ static int __init register_kernel_offset_dumper(void)
return 0;
}
__initcall(register_kernel_offset_dumper);
+
+#ifdef CONFIG_HOTPLUG_CPU
+bool arch_cpu_is_hotpluggable(int cpu)
+{
+ return cpu > 0;
+}
+#endif /* CONFIG_HOTPLUG_CPU */