aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386/kernel/smpboot.c
diff options
context:
space:
mode:
authorVivek Goyal <vgoyal@in.ibm.com>2007-01-10 19:52:44 -0500
committerAndi Kleen <andi@basil.nowhere.org>2007-01-10 19:52:44 -0500
commit4a5d107a9a79ef3404209a43866554cba451dda4 (patch)
tree9bcbd0d710f6fb4e504cd632839e213537bfe09a /arch/i386/kernel/smpboot.c
parent24420760c3701ff422b344e047a20ca09b76fc64 (diff)
[PATCH] i386: cpu hotplug/smpboot misc MODPOST warning fixes
o Misc smpboot/cpu hotplug path cleanups. I did those to supress the warnings generated by MODPOST. These warnings are visible only if CONFIG_RELOCATABLE=y. o CONFIG_RELOCATABLE compiles the kernel with --emit-relocs option. This option retains relocation information in vmlinux file and MODPOST is quick to spit out "Section mismatch" warnings. o This patch fixes some of those warnings. Many of the functions in smpboot case are __devinit type and they in turn accesses text/data which if of type __cpuinit. Now if CONFIG_HOTPLUG=y and CONFIG_HOTPLUG_CPU=n then we end up in cases where a function in .text segment is calling another function in .init.text segment and MODPOST emits warning. WARNING: vmlinux - Section mismatch: reference to .init.text:identify_cpu from .text between 'smp_store_cpu_info' (at offset 0xc011020d) and 'do_boot_cpu' WARNING: vmlinux - Section mismatch: reference to .init.text:init_gdt from .text between 'do_boot_cpu' (at offset 0xc01102ca) and '__cpu_up' WARNING: vmlinux - Section mismatch: reference to .init.text:print_cpu_info from .text between 'do_boot_cpu' (at offset 0xc01105d0) and '__cpu_up' o It also fixes the issues where CONFIG_HOTPLUG_CPU=y and start_secondary() is calling smp_callin() which in-turn calls synchronize_tsc_ap() which is of type __init. This should have meant broken CPU hotplug. WARNING: vmlinux - Section mismatch: reference to .init.data: from .text between 'start_secondary' (at offset 0xc011603f) and 'initialize_secondary' WARNING: vmlinux - Section mismatch: reference to .init.data: from .text between 'MP_processor_info' (at offset 0xc0116a4f) and 'mp_register_lapic' WARNING: vmlinux - Section mismatch: reference to .init.data: from .text between 'MP_processor_info' (at offset 0xc0116a4f) and 'mp_register_lapic' Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Andi Kleen <ak@suse.de>
Diffstat (limited to 'arch/i386/kernel/smpboot.c')
-rw-r--r--arch/i386/kernel/smpboot.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/i386/kernel/smpboot.c b/arch/i386/kernel/smpboot.c
index 300d9b38d02e..dea7ef9d3e82 100644
--- a/arch/i386/kernel/smpboot.c
+++ b/arch/i386/kernel/smpboot.c
@@ -159,7 +159,7 @@ void __init smp_alloc_memory(void)
159 * a given CPU 159 * a given CPU
160 */ 160 */
161 161
162static void __devinit smp_store_cpu_info(int id) 162static void __cpuinit smp_store_cpu_info(int id)
163{ 163{
164 struct cpuinfo_x86 *c = cpu_data + id; 164 struct cpuinfo_x86 *c = cpu_data + id;
165 165
@@ -364,7 +364,7 @@ extern void calibrate_delay(void);
364 364
365static atomic_t init_deasserted; 365static atomic_t init_deasserted;
366 366
367static void __devinit smp_callin(void) 367static void __cpuinit smp_callin(void)
368{ 368{
369 int cpuid, phys_id; 369 int cpuid, phys_id;
370 unsigned long timeout; 370 unsigned long timeout;
@@ -538,7 +538,7 @@ set_cpu_sibling_map(int cpu)
538/* 538/*
539 * Activate a secondary processor. 539 * Activate a secondary processor.
540 */ 540 */
541static void __devinit start_secondary(void *unused) 541static void __cpuinit start_secondary(void *unused)
542{ 542{
543 /* 543 /*
544 * Don't put *anything* before secondary_cpu_init(), SMP 544 * Don't put *anything* before secondary_cpu_init(), SMP
@@ -931,7 +931,7 @@ static inline struct task_struct * alloc_idle_task(int cpu)
931#define alloc_idle_task(cpu) fork_idle(cpu) 931#define alloc_idle_task(cpu) fork_idle(cpu)
932#endif 932#endif
933 933
934static int __devinit do_boot_cpu(int apicid, int cpu) 934static int __cpuinit do_boot_cpu(int apicid, int cpu)
935/* 935/*
936 * NOTE - on most systems this is a PHYSICAL apic ID, but on multiquad 936 * NOTE - on most systems this is a PHYSICAL apic ID, but on multiquad
937 * (ie clustered apic addressing mode), this is a LOGICAL apic ID. 937 * (ie clustered apic addressing mode), this is a LOGICAL apic ID.
@@ -1432,7 +1432,7 @@ void __cpu_die(unsigned int cpu)
1432} 1432}
1433#endif /* CONFIG_HOTPLUG_CPU */ 1433#endif /* CONFIG_HOTPLUG_CPU */
1434 1434
1435int __devinit __cpu_up(unsigned int cpu) 1435int __cpuinit __cpu_up(unsigned int cpu)
1436{ 1436{
1437#ifdef CONFIG_HOTPLUG_CPU 1437#ifdef CONFIG_HOTPLUG_CPU
1438 int ret=0; 1438 int ret=0;