diff options
author | Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com> | 2008-04-30 03:50:55 -0400 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2008-04-30 17:08:07 -0400 |
commit | 6d3c51110819918617d9e2d1da7ff53f4b2c1187 (patch) | |
tree | 797beea07ae393830a34b7021dec661d46dbbbb4 | |
parent | 9d4efae68714e24d40b628461bc4182e330969b1 (diff) |
[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: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
-rw-r--r-- | arch/ia64/kernel/topology.c | 16 | ||||
-rw-r--r-- | include/asm-ia64/cpu.h | 2 |
2 files changed, 11 insertions, 7 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 | } |
37 | EXPORT_SYMBOL_GPL(arch_fix_phys_package_id); | 37 | EXPORT_SYMBOL_GPL(arch_fix_phys_package_id); |
38 | 38 | ||
39 | int arch_register_cpu(int num) | 39 | |
40 | #ifdef CONFIG_HOTPLUG_CPU | ||
41 | int __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 | 54 | EXPORT_SYMBOL(arch_register_cpu); | |
54 | #ifdef CONFIG_HOTPLUG_CPU | ||
55 | 55 | ||
56 | void arch_unregister_cpu(int num) | 56 | void 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 | } |
61 | EXPORT_SYMBOL(arch_register_cpu); | ||
62 | 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 | } | ||
63 | #endif /*CONFIG_HOTPLUG_CPU*/ | 67 | #endif /*CONFIG_HOTPLUG_CPU*/ |
64 | 68 | ||
65 | 69 | ||
diff --git a/include/asm-ia64/cpu.h b/include/asm-ia64/cpu.h index e87fa3210a2b..fcca30b9f110 100644 --- a/include/asm-ia64/cpu.h +++ b/include/asm-ia64/cpu.h | |||
@@ -14,8 +14,8 @@ DECLARE_PER_CPU(struct ia64_cpu, cpu_devices); | |||
14 | 14 | ||
15 | DECLARE_PER_CPU(int, cpu_state); | 15 | DECLARE_PER_CPU(int, cpu_state); |
16 | 16 | ||
17 | extern int arch_register_cpu(int num); | ||
18 | #ifdef CONFIG_HOTPLUG_CPU | 17 | #ifdef CONFIG_HOTPLUG_CPU |
18 | extern int arch_register_cpu(int num); | ||
19 | extern void arch_unregister_cpu(int); | 19 | extern void arch_unregister_cpu(int); |
20 | #endif | 20 | #endif |
21 | 21 | ||