Skip to content

Commit edf66a3

Browse files
rafaeljwIngo Molnar
authored andcommitted
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 <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Link: https://lore.kernel.org/r/12422874.O9o76ZdvQC@kreacher
1 parent 4ae3dc8 commit edf66a3

File tree

3 files changed

+9
-44
lines changed

3 files changed

+9
-44
lines changed

arch/x86/kernel/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ obj-$(CONFIG_X86_64) += sys_x86_64.o
6262
obj-$(CONFIG_X86_ESPFIX64) += espfix_64.o
6363
obj-$(CONFIG_SYSFS) += ksysfs.o
6464
obj-y += bootflag.o e820.o
65-
obj-y += pci-dma.o quirks.o topology.o kdebugfs.o
65+
obj-y += pci-dma.o quirks.o kdebugfs.o
6666
obj-y += alternative.o i8253.o hw_breakpoint.o
6767
obj-y += tsc.o tsc_msr.o io_delay.o rtc.o
6868
obj-y += resource.o

arch/x86/kernel/setup.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
*/
88
#include <linux/acpi.h>
99
#include <linux/console.h>
10+
#include <linux/cpu.h>
1011
#include <linux/crash_dump.h>
1112
#include <linux/dma-map-ops.h>
1213
#include <linux/dmi.h>
@@ -1227,3 +1228,10 @@ static int __init register_kernel_offset_dumper(void)
12271228
return 0;
12281229
}
12291230
__initcall(register_kernel_offset_dumper);
1231+
1232+
#ifdef CONFIG_HOTPLUG_CPU
1233+
bool arch_cpu_is_hotpluggable(int cpu)
1234+
{
1235+
return cpu > 0;
1236+
}
1237+
#endif /* CONFIG_HOTPLUG_CPU */

arch/x86/kernel/topology.c

Lines changed: 0 additions & 43 deletions
This file was deleted.

0 commit comments

Comments
 (0)