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