Skip to contentSkip to conversation

arc: include: asm: remove '__init' for setup_processor() and arc_init_IRQ()

PATCH In review Chen Gang 2 participants 3 messages Oct 23, 2013 – Oct 29, 2013 Synopsys ARC architecture

lore
Share & tools
lore

Chen Gang

author
#0 lore raw

PATCH 1/1 arc: include: asm: remove '__init' for setup_processor() and arc_init_IRQ()

They haven't '__init' in definition, but has '__init' in declaration. And normal function start_kernel_secondary() may call setup_processor() which will call arc_init_IRQ().

So need remove '__init' for both of them. The related warning (with allmodconfig):

MODPOST vmlinux.o
WARNING: vmlinux.o(.text+0x3084): Section mismatch in reference from the function start_kernel_secondary() to the function .init.text:setup_processor() The function start_kernel_secondary() references
the function __init setup_processor().
This is often because start_kernel_secondary lacks a __init
annotation or the annotation of setup_processor is wrong.

---
 arch/arc/include/asm/irq.h   |    2 +-
 arch/arc/include/asm/setup.h |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
arch/arc/include/asm/irq.h +1 -1
index c0a7210..548207f 100644
@@ -18,7 +18,7 @@
 
 #include <asm-generic/irq.h>
 
-extern void __init arc_init_IRQ(void);
+extern void arc_init_IRQ(void);
 extern int __init get_hw_config_num_irq(void);
 
 void arc_local_timer_setup(unsigned int cpu);
arch/arc/include/asm/setup.h +1 -1
index 229e506..e10f8ce 100644
@@ -31,7 +31,7 @@ struct cpuinfo_data {
 extern int root_mountflags, end_mem;
 extern int running_on_hw;
 
-void __init setup_processor(void);
+void setup_processor(void);
 void __init setup_arch_memory(void);
 
 #endif /* __ASMARC_SETUP_H */
Signature · 1 line
1.7.7.6
#1 lore raw
Quoted 15 lines · Chen Gang

They haven't '__init' in definition, but has '__init' in declaration. And normal function start_kernel_secondary() may call setup_processor() which will call arc_init_IRQ().

So need remove '__init' for both of them. The related warning (with allmodconfig):

MODPOST vmlinux.o
WARNING: vmlinux.o(.text+0x3084): Section mismatch in reference from the function start_kernel_secondary() to the function .init.text:setup_processor() The function start_kernel_secondary() references
the function __init setup_processor().
This is often because start_kernel_secondary lacks a __init
annotation or the annotation of setup_processor is wrong.

Quoted 1 line

Applied for 3.13

-Vineet

author
#2 lore raw
Quoted 16 lines · Vineet Gupta
Quoted 15 lines · Chen Gang

They haven't '__init' in definition, but has '__init' in declaration. And normal function start_kernel_secondary() may call setup_processor() which will call arc_init_IRQ().

So need remove '__init' for both of them. The related warning (with allmodconfig):

MODPOST vmlinux.o
WARNING: vmlinux.o(.text+0x3084): Section mismatch in reference from the function start_kernel_secondary() to the function .init.text:setup_processor() The function start_kernel_secondary() references
the function __init setup_processor().
This is often because start_kernel_secondary lacks a __init
annotation or the annotation of setup_processor is wrong.

Quoted 4 lines
Quoted 1 line

Applied for 3.13

Thanks.

Signature · 1 line
Chen Gang