diff options
Diffstat (limited to 'arch/ia64/kernel/topology.c')
-rw-r--r-- | arch/ia64/kernel/topology.c | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/arch/ia64/kernel/topology.c b/arch/ia64/kernel/topology.c index a2484fc1a06c..26228e2d01ae 100644 --- a/arch/ia64/kernel/topology.c +++ b/arch/ia64/kernel/topology.c | |||
@@ -27,9 +27,20 @@ | |||
27 | 27 | ||
28 | static struct ia64_cpu *sysfs_cpus; | 28 | static struct ia64_cpu *sysfs_cpus; |
29 | 29 | ||
30 | int arch_register_cpu(int num) | 30 | void arch_fix_phys_package_id(int num, u32 slot) |
31 | { | 31 | { |
32 | #if defined (CONFIG_ACPI) && defined (CONFIG_HOTPLUG_CPU) | 32 | #ifdef CONFIG_SMP |
33 | if (cpu_data(num)->socket_id == -1) | ||
34 | cpu_data(num)->socket_id = slot; | ||
35 | #endif | ||
36 | } | ||
37 | EXPORT_SYMBOL_GPL(arch_fix_phys_package_id); | ||
38 | |||
39 | |||
40 | #ifdef CONFIG_HOTPLUG_CPU | ||
41 | int __ref arch_register_cpu(int num) | ||
42 | { | ||
43 | #ifdef CONFIG_ACPI | ||
33 | /* | 44 | /* |
34 | * If CPEI can be re-targetted or if this is not | 45 | * If CPEI can be re-targetted or if this is not |
35 | * CPEI target, then it is hotpluggable | 46 | * CPEI target, then it is hotpluggable |
@@ -38,19 +49,21 @@ int arch_register_cpu(int num) | |||
38 | sysfs_cpus[num].cpu.hotpluggable = 1; | 49 | sysfs_cpus[num].cpu.hotpluggable = 1; |
39 | map_cpu_to_node(num, node_cpuid[num].nid); | 50 | map_cpu_to_node(num, node_cpuid[num].nid); |
40 | #endif | 51 | #endif |
41 | |||
42 | return register_cpu(&sysfs_cpus[num].cpu, num); | 52 | return register_cpu(&sysfs_cpus[num].cpu, num); |
43 | } | 53 | } |
44 | 54 | EXPORT_SYMBOL(arch_register_cpu); | |
45 | #ifdef CONFIG_HOTPLUG_CPU | ||
46 | 55 | ||
47 | void arch_unregister_cpu(int num) | 56 | void arch_unregister_cpu(int num) |
48 | { | 57 | { |
49 | unregister_cpu(&sysfs_cpus[num].cpu); | 58 | unregister_cpu(&sysfs_cpus[num].cpu); |
50 | unmap_cpu_from_node(num, cpu_to_node(num)); | 59 | unmap_cpu_from_node(num, cpu_to_node(num)); |
51 | } | 60 | } |
52 | EXPORT_SYMBOL(arch_register_cpu); | ||
53 | EXPORT_SYMBOL(arch_unregister_cpu); | 61 | EXPORT_SYMBOL(arch_unregister_cpu); |
62 | #else | ||
63 | static int __init arch_register_cpu(int num) | ||
64 | { | ||
65 | return register_cpu(&sysfs_cpus[num].cpu, num); | ||
66 | } | ||
54 | #endif /*CONFIG_HOTPLUG_CPU*/ | 67 | #endif /*CONFIG_HOTPLUG_CPU*/ |
55 | 68 | ||
56 | 69 | ||