• V
    [PATCH] generic: Break init() in two parts to avoid MODPOST warnings · ee5bfa64
    Vivek Goyal 提交于
    o init() is a non __init function in .text section but it calls many
      functions which are in .init.text section. Hence MODPOST generates lots
      of cross reference warnings on i386 if compiled with CONFIG_RELOCATABLE=y
    
    WARNING: vmlinux - Section mismatch: reference to .init.text:smp_prepare_cpus from .text between 'init' (at offset 0xc0101049) and 'rest_init'
    WARNING: vmlinux - Section mismatch: reference to .init.text:migration_init from .text between 'init' (at offset 0xc010104e) and 'rest_init'
    WARNING: vmlinux - Section mismatch: reference to .init.text:spawn_ksoftirqd from .text between 'init' (at offset 0xc0101053) and 'rest_init'
    
    o This patch breaks down init() in two parts. One part which can go
      in .init.text section and can be freed and other part which has to
      be non __init(init_post()). Now init() calls init_post() and init_post()
      does not call any functions present in .init sections. Hence getting
      rid of warnings.
    Signed-off-by: NVivek Goyal <vgoyal@in.ibm.com>
    Signed-off-by: NAndrew Morton <akpm@osdl.org>
    Signed-off-by: NAndi Kleen <ak@suse.de>
    ee5bfa64
main.c 19.5 KB