Skip to contentSkip to conversation

arc: kernel: remove '__init' for get_hw_config_num_irq()

PATCH New Chen Gang 1 participant 1 message Oct 23, 2013 Synopsys ARC architecture

lore
Share & tools
lore

Chen Gang

author
#0 lore raw

PATCH 1/1 arc: kernel: remove '__init' for get_hw_config_num_irq()

get_hw_config_num_irq() may be called by normal iss_model_init_smp() which is a function pointer for 'init_smp' which may be called by first_lines_of_secondary() which also need be normal too.

The related warning (with allmodconfig):

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

---
 arch/arc/include/asm/irq.h |    2 +-
 arch/arc/kernel/irq.c      |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
arch/arc/include/asm/irq.h +1 -1
index 548207f..291a70d 100644
@@ -19,7 +19,7 @@
 #include <asm-generic/irq.h>
 
 extern void arc_init_IRQ(void);
-extern int __init get_hw_config_num_irq(void);
+extern int get_hw_config_num_irq(void);
 
 void arc_local_timer_setup(unsigned int cpu);
 
arch/arc/kernel/irq.c +1 -1
index 5fc9245..e2bdfe5 100644
@@ -146,7 +146,7 @@ void arch_do_IRQ(unsigned int irq, struct pt_regs *regs)
 	set_irq_regs(old_regs);
 }
 
-int __init get_hw_config_num_irq(void)
+int get_hw_config_num_irq(void)
 {
 	uint32_t val = read_aux_reg(ARC_REG_VECBASE_BCR);
 
Signature · 1 line
1.7.7.6