Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mips: fix tlb_init() prototype

There are two definitions for tlb_init(), but no global declaration:

arch/mips/mm/tlb-r4k.c:552:6: error: no previous prototype for 'tlb_init' [-Werror=missing-prototypes]
arch/mips/mm/tlb-r3k.c:244:6: error: no previous prototype for 'tlb_init' [-Werror=missing-prototypes]

Move the declaration to asm/setup.h and included it as needed.

Link: https://lkml.kernel.org/r/20231204115710.2247097-12-arnd@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Stephen Rothwell <sfr@rothwell.id.au>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Arnd Bergmann and committed by
Andrew Morton
ec47b986 e021227a

+3 -2
+1
arch/mips/include/asm/setup.h
··· 27 27 extern unsigned int hwrena; 28 28 extern void per_cpu_trap_init(bool); 29 29 extern void cpu_cache_init(void); 30 + extern void tlb_init(void); 30 31 31 32 #endif /* __SETUP_H */
-2
arch/mips/kernel/traps.c
··· 2157 2157 return set_vi_srs_handler(n, addr, 0); 2158 2158 } 2159 2159 2160 - extern void tlb_init(void); 2161 - 2162 2160 /* 2163 2161 * Timer interrupt 2164 2162 */
+1
arch/mips/mm/tlb-r3k.c
··· 23 23 #include <asm/io.h> 24 24 #include <asm/bootinfo.h> 25 25 #include <asm/cpu.h> 26 + #include <asm/setup.h> 26 27 #include <asm/tlbex.h> 27 28 28 29 #undef DEBUG_TLB
+1
arch/mips/mm/tlb-r4k.c
··· 24 24 #include <asm/tlb.h> 25 25 #include <asm/tlbex.h> 26 26 #include <asm/tlbmisc.h> 27 + #include <asm/setup.h> 27 28 28 29 /* 29 30 * LOONGSON-2 has a 4 entry itlb which is a subset of jtlb, LOONGSON-3 has