Make __declare_dbe_table() static and call it explicitly to ensure not optimized out. Signed-off-by: Atsushi Nemoto <anemo@xxxxxxxxxxxxx> --- diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index cfd1785..78a3f75 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c @@ -340,7 +340,7 @@ NORET_TYPE void ATTRIB_NORET die(const c extern const struct exception_table_entry __start___dbe_table[]; extern const struct exception_table_entry __stop___dbe_table[]; -void __declare_dbe_table(void) +static void __declare_dbe_table(void) { __asm__ __volatile__( ".section\t__dbe_table,\"a\"\n\t" @@ -1576,4 +1576,5 @@ void __init trap_init(void) flush_icache_range(ebase, ebase + 0x400); flush_tlb_handlers(); + __declare_dbe_table(); }