• Vivek Goyal's avatar
    [PATCH] i386: cpu hotplug/smpboot misc MODPOST warning fixes · 4a5d107a
    Vivek Goyal authored
    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: default avatarVivek Goyal <vgoyal@in.ibm.com>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarAndi Kleen <ak@suse.de>
    4a5d107a
mpparse.c 29.6 KB