diff options
author | Vivek Goyal <vgoyal@in.ibm.com> | 2007-01-10 19:52:44 -0500 |
---|---|---|
committer | Andi Kleen <andi@basil.nowhere.org> | 2007-01-10 19:52:44 -0500 |
commit | 4a5d107a9a79ef3404209a43866554cba451dda4 (patch) | |
tree | 9bcbd0d710f6fb4e504cd632839e213537bfe09a /arch/i386/kernel/mpparse.c | |
parent | 24420760c3701ff422b344e047a20ca09b76fc64 (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/mpparse.c')
-rw-r--r-- | arch/i386/kernel/mpparse.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/i386/kernel/mpparse.c b/arch/i386/kernel/mpparse.c index 2ce67228dff8..49bff3596bff 100644 --- a/arch/i386/kernel/mpparse.c +++ b/arch/i386/kernel/mpparse.c | |||
@@ -36,7 +36,7 @@ | |||
36 | 36 | ||
37 | /* Have we found an MP table */ | 37 | /* Have we found an MP table */ |
38 | int smp_found_config; | 38 | int smp_found_config; |
39 | unsigned int __initdata maxcpus = NR_CPUS; | 39 | unsigned int __cpuinitdata maxcpus = NR_CPUS; |
40 | 40 | ||
41 | /* | 41 | /* |
42 | * Various Linux-internal data structures created from the | 42 | * Various Linux-internal data structures created from the |
@@ -102,9 +102,9 @@ static int __init mpf_checksum(unsigned char *mp, int len) | |||
102 | */ | 102 | */ |
103 | 103 | ||
104 | static int mpc_record; | 104 | static int mpc_record; |
105 | static struct mpc_config_translation *translation_table[MAX_MPC_ENTRY] __initdata; | 105 | static struct mpc_config_translation *translation_table[MAX_MPC_ENTRY] __cpuinitdata; |
106 | 106 | ||
107 | static void __devinit MP_processor_info (struct mpc_config_processor *m) | 107 | static void __cpuinit MP_processor_info (struct mpc_config_processor *m) |
108 | { | 108 | { |
109 | int ver, apicid; | 109 | int ver, apicid; |
110 | physid_mask_t phys_cpu; | 110 | physid_mask_t phys_cpu; |
@@ -822,7 +822,7 @@ void __init mp_register_lapic_address(u64 address) | |||
822 | Dprintk("Boot CPU = %d\n", boot_cpu_physical_apicid); | 822 | Dprintk("Boot CPU = %d\n", boot_cpu_physical_apicid); |
823 | } | 823 | } |
824 | 824 | ||
825 | void __devinit mp_register_lapic (u8 id, u8 enabled) | 825 | void __cpuinit mp_register_lapic (u8 id, u8 enabled) |
826 | { | 826 | { |
827 | struct mpc_config_processor processor; | 827 | struct mpc_config_processor processor; |
828 | int boot_cpu = 0; | 828 | int boot_cpu = 0; |