]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/ia64/kernel/topology.c
[IA64] Clear up section mismatch with arch_unregister_cpu()
[linux-2.6-omap-h63xx.git] / arch / ia64 / kernel / topology.c
index a2484fc1a06c43482e575888ca1991d45faf43e7..c75b914f2d6bb587c413990663e864f573c9368a 100644 (file)
 
 static struct ia64_cpu *sysfs_cpus;
 
-int arch_register_cpu(int num)
+void arch_fix_phys_package_id(int num, u32 slot)
 {
-#if defined (CONFIG_ACPI) && defined (CONFIG_HOTPLUG_CPU)
+#ifdef CONFIG_SMP
+       if (cpu_data(num)->socket_id == -1)
+               cpu_data(num)->socket_id = slot;
+#endif
+}
+EXPORT_SYMBOL_GPL(arch_fix_phys_package_id);
+
+
+#ifdef CONFIG_HOTPLUG_CPU
+int __ref arch_register_cpu(int num)
+{
+#ifdef CONFIG_ACPI
        /*
         * If CPEI can be re-targetted or if this is not
         * CPEI target, then it is hotpluggable
@@ -38,19 +49,23 @@ int arch_register_cpu(int num)
                sysfs_cpus[num].cpu.hotpluggable = 1;
        map_cpu_to_node(num, node_cpuid[num].nid);
 #endif
-
        return register_cpu(&sysfs_cpus[num].cpu, num);
 }
+EXPORT_SYMBOL(arch_register_cpu);
 
-#ifdef CONFIG_HOTPLUG_CPU
-
-void arch_unregister_cpu(int num)
+void __ref arch_unregister_cpu(int num)
 {
        unregister_cpu(&sysfs_cpus[num].cpu);
+#ifdef CONFIG_ACPI
        unmap_cpu_from_node(num, cpu_to_node(num));
+#endif
 }
-EXPORT_SYMBOL(arch_register_cpu);
 EXPORT_SYMBOL(arch_unregister_cpu);
+#else
+static int __init arch_register_cpu(int num)
+{
+       return register_cpu(&sysfs_cpus[num].cpu, num);
+}
 #endif /*CONFIG_HOTPLUG_CPU*/