diff options
author | Paul Mackerras <paulus@samba.org> | 2008-05-09 20:12:06 +1000 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2008-05-09 20:12:06 +1000 |
commit | 2a5f2e3e6cd1ce9fb3f8b186b6bc9aa1f1497a92 (patch) | |
tree | b2306840f227972a7c9d4a2b75e516fe81358ce8 /arch/ia64/kernel/topology.c | |
parent | 02539d71fa98d5737bb668b02286c76241e4bac9 (diff) | |
parent | 78be76476a34a77f0ea9db2f78ba46a2b0fd5ab5 (diff) |
Merge branch 'for-2.6.26' of master.kernel.org:/pub/scm/linux/kernel/git/jwboyer/powerpc-4xx into merge
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 @@ 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,21 @@ 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); } - -#ifdef CONFIG_HOTPLUG_CPU +EXPORT_SYMBOL(arch_register_cpu); void arch_unregister_cpu(int num) { unregister_cpu(&sysfs_cpus[num].cpu); unmap_cpu_from_node(num, cpu_to_node(num)); } -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*/ |