Commit 6d3c5111 authored by Hidetoshi Seto's avatar Hidetoshi Seto Committed by Tony Luck

[IA64] fix section mismatch in arch/ia64/kernel/topology.c

This patch silences:

	WARNING: vmlinux.o(.text+0x44672): Section mismatch in
	reference from the function arch_register_cpu() to the
	function .cpuinit.text:register_cpu()

Changes are based on codes in arch/x86/kernel/topology.c
Signed-off-by: default avatarHidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
parent 9d4efae6
...@@ -36,9 +36,11 @@ void arch_fix_phys_package_id(int num, u32 slot) ...@@ -36,9 +36,11 @@ void arch_fix_phys_package_id(int num, u32 slot)
} }
EXPORT_SYMBOL_GPL(arch_fix_phys_package_id); EXPORT_SYMBOL_GPL(arch_fix_phys_package_id);
int arch_register_cpu(int num)
#ifdef CONFIG_HOTPLUG_CPU
int __ref arch_register_cpu(int num)
{ {
#if defined (CONFIG_ACPI) && defined (CONFIG_HOTPLUG_CPU) #ifdef CONFIG_ACPI
/* /*
* If CPEI can be re-targetted or if this is not * If CPEI can be re-targetted or if this is not
* CPEI target, then it is hotpluggable * CPEI target, then it is hotpluggable
...@@ -47,19 +49,21 @@ int arch_register_cpu(int num) ...@@ -47,19 +49,21 @@ int arch_register_cpu(int num)
sysfs_cpus[num].cpu.hotpluggable = 1; sysfs_cpus[num].cpu.hotpluggable = 1;
map_cpu_to_node(num, node_cpuid[num].nid); map_cpu_to_node(num, node_cpuid[num].nid);
#endif #endif
return register_cpu(&sysfs_cpus[num].cpu, num); return register_cpu(&sysfs_cpus[num].cpu, num);
} }
EXPORT_SYMBOL(arch_register_cpu);
#ifdef CONFIG_HOTPLUG_CPU
void arch_unregister_cpu(int num) void arch_unregister_cpu(int num)
{ {
unregister_cpu(&sysfs_cpus[num].cpu); unregister_cpu(&sysfs_cpus[num].cpu);
unmap_cpu_from_node(num, cpu_to_node(num)); unmap_cpu_from_node(num, cpu_to_node(num));
} }
EXPORT_SYMBOL(arch_register_cpu);
EXPORT_SYMBOL(arch_unregister_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*/ #endif /*CONFIG_HOTPLUG_CPU*/
......
...@@ -14,8 +14,8 @@ DECLARE_PER_CPU(struct ia64_cpu, cpu_devices); ...@@ -14,8 +14,8 @@ DECLARE_PER_CPU(struct ia64_cpu, cpu_devices);
DECLARE_PER_CPU(int, cpu_state); DECLARE_PER_CPU(int, cpu_state);
extern int arch_register_cpu(int num);
#ifdef CONFIG_HOTPLUG_CPU #ifdef CONFIG_HOTPLUG_CPU
extern int arch_register_cpu(int num);
extern void arch_unregister_cpu(int); extern void arch_unregister_cpu(int);
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment