arc: kernel: remove '__init' for first_lines_of_secondary()
PATCH 1/1 arc: kernel: remove '__init' for first_lines_of_secondary()
first_lines_of_secondary() is a '__init' function, but it may be called by __cpu_up() by _cpu_up() by cpu_up() which is a normal export symbol function. So recommend to remove '__init'.
The related warning (with allmodconfig):
MODPOST vmlinux.o
WARNING: vmlinux.o(.text+0x315c): Section mismatch in reference from the function __cpu_up() to the function .init.text:first_lines_of_secondary() The function __cpu_up() references
the function __init first_lines_of_secondary().
This is often because __cpu_up lacks a __init
annotation or the annotation of first_lines_of_secondary is wrong.
--- arch/arc/include/asm/smp.h | 2 +- arch/arc/kernel/head.S | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/arc/include/asm/smp.h +1 -1
@@ -30,7 +30,7 @@ extern void arch_send_call_function_ipi_mask(const struct cpumask *mask);* APIs provided by arch SMP code to rest of arch code */ extern void __init smp_init_cpus (void ); -extern void __init first_lines_of_secondary (void ); +extern void first_lines_of_secondary (void );extern const char *arc_platform_smp_cpuinfo (void );/*
arch/arc/kernel/head.S +1 -1
@@ -95,7 +95,7 @@ stext: ;---------------------------------------------------------------- ; First lines of code run by secondary before jumping to 'C' ;---------------------------------------------------------------- - .section .init.text, "ax",@progbits + .section .text, "ax",@progbits .type first_lines_of_secondary, @function .globl first_lines_of_secondary
Signature · 1 line
1.7.7.6
Quoted 14 lines · Chen Gang
first_lines_of_secondary()is a '__init' function, but it may be called by__cpu_up()by_cpu_up()bycpu_up()which is a normal export symbol function. So recommend to remove '__init'.The related warning (with allmodconfig):
MODPOST vmlinux.o
WARNING:vmlinux.o(.text+0x315c): Section mismatch in reference from the function__cpu_up()to the function .init.text:first_lines_of_secondary() The function__cpu_up()references
the function__initfirst_lines_of_secondary().
This is often because__cpu_uplacks a__init
annotation or the annotation offirst_lines_of_secondaryis wrong.
Quoted 1 line
Signed-off-by Chen Gang <[email protected]>
Applied for 3.13. But I'm planning to squash all the __init section annotation fixes into one patch. OK with you ?
Thx,
-Vineet
Quoted 15 lines · Vineet Gupta
Quoted 14 lines · Chen Gang
first_lines_of_secondary()is a '__init' function, but it may be called by__cpu_up()by_cpu_up()bycpu_up()which is a normal export symbol function. So recommend to remove '__init'.The related warning (with allmodconfig):
MODPOST vmlinux.o
WARNING:vmlinux.o(.text+0x315c): Section mismatch in reference from the function__cpu_up()to the function .init.text:first_lines_of_secondary() The function__cpu_up()references
the function__initfirst_lines_of_secondary().
This is often because__cpu_uplacks a__init
annotation or the annotation offirst_lines_of_secondaryis wrong.
Quoted 5 lines
Quoted 1 line
Signed-off-by Chen Gang <[email protected]>Applied for 3.13. But I'm planning to squash all the
__initsection annotation fixes into one patch. OK with you ?
It is OK to me. They are all related with each other, although toolchain reports several warnings (originally, I made them based on warning items).
Thanks.
Signature · 1 line
Chen Gang