diff options
| -rw-r--r-- | arch/x86/kernel/topology.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/arch/x86/kernel/topology.c b/arch/x86/kernel/topology.c index 0fcc95a354f7..7e4515957a1c 100644 --- a/arch/x86/kernel/topology.c +++ b/arch/x86/kernel/topology.c | |||
| @@ -25,10 +25,10 @@ | |||
| 25 | * | 25 | * |
| 26 | * Send feedback to <colpatch@us.ibm.com> | 26 | * Send feedback to <colpatch@us.ibm.com> |
| 27 | */ | 27 | */ |
| 28 | #include <linux/init.h> | ||
| 29 | #include <linux/smp.h> | ||
| 30 | #include <linux/nodemask.h> | 28 | #include <linux/nodemask.h> |
| 31 | #include <linux/mmzone.h> | 29 | #include <linux/mmzone.h> |
| 30 | #include <linux/init.h> | ||
| 31 | #include <linux/smp.h> | ||
| 32 | #include <asm/cpu.h> | 32 | #include <asm/cpu.h> |
| 33 | 33 | ||
| 34 | static DEFINE_PER_CPU(struct x86_cpu, cpu_devices); | 34 | static DEFINE_PER_CPU(struct x86_cpu, cpu_devices); |
| @@ -47,6 +47,7 @@ int __ref arch_register_cpu(int num) | |||
| 47 | */ | 47 | */ |
| 48 | if (num) | 48 | if (num) |
| 49 | per_cpu(cpu_devices, num).cpu.hotpluggable = 1; | 49 | per_cpu(cpu_devices, num).cpu.hotpluggable = 1; |
| 50 | |||
| 50 | return register_cpu(&per_cpu(cpu_devices, num).cpu, num); | 51 | return register_cpu(&per_cpu(cpu_devices, num).cpu, num); |
| 51 | } | 52 | } |
| 52 | EXPORT_SYMBOL(arch_register_cpu); | 53 | EXPORT_SYMBOL(arch_register_cpu); |
| @@ -56,12 +57,13 @@ void arch_unregister_cpu(int num) | |||
| 56 | unregister_cpu(&per_cpu(cpu_devices, num).cpu); | 57 | unregister_cpu(&per_cpu(cpu_devices, num).cpu); |
| 57 | } | 58 | } |
| 58 | EXPORT_SYMBOL(arch_unregister_cpu); | 59 | EXPORT_SYMBOL(arch_unregister_cpu); |
| 59 | #else | 60 | #else /* CONFIG_HOTPLUG_CPU */ |
| 61 | |||
| 60 | static int __init arch_register_cpu(int num) | 62 | static int __init arch_register_cpu(int num) |
| 61 | { | 63 | { |
| 62 | return register_cpu(&per_cpu(cpu_devices, num).cpu, num); | 64 | return register_cpu(&per_cpu(cpu_devices, num).cpu, num); |
| 63 | } | 65 | } |
| 64 | #endif /*CONFIG_HOTPLUG_CPU*/ | 66 | #endif /* CONFIG_HOTPLUG_CPU */ |
| 65 | 67 | ||
| 66 | static int __init topology_init(void) | 68 | static int __init topology_init(void) |
| 67 | { | 69 | { |
| @@ -70,11 +72,11 @@ static int __init topology_init(void) | |||
| 70 | #ifdef CONFIG_NUMA | 72 | #ifdef CONFIG_NUMA |
| 71 | for_each_online_node(i) | 73 | for_each_online_node(i) |
| 72 | register_one_node(i); | 74 | register_one_node(i); |
| 73 | #endif /* CONFIG_NUMA */ | 75 | #endif |
| 74 | 76 | ||
| 75 | for_each_present_cpu(i) | 77 | for_each_present_cpu(i) |
| 76 | arch_register_cpu(i); | 78 | arch_register_cpu(i); |
| 79 | |||
| 77 | return 0; | 80 | return 0; |
| 78 | } | 81 | } |
| 79 | |||
| 80 | subsys_initcall(topology_init); | 82 | subsys_initcall(topology_init); |
