Commit 66445677 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Andrew Morton
Browse files

mips: move cache declarations into header

Some of the cache functions are declared only for their callers, e.g.

arch/mips/mm/c-r3k.c:28:15: error: no previous prototype for 'r3k_cache_size' [-Werror=missing-prototypes]
arch/mips/mm/c-r3k.c:63:15: error: no previous prototype for 'r3k_cache_lsize' [-Werror=missing-prototypes]
arch/mips/mm/c-r4k.c:1703:6: error: no previous prototype for 'r4k_cache_init' [-Werror=missing-prototypes]
arch/mips/mm/sc-mips.c:255:5: error: no previous prototype for 'mips_sc_init' [-Werror=missing-prototypes]

Move all the declarations to asm/cache.h and asm/r4kcache.h where they
can be seen by the function definitions.

Link: https://lkml.kernel.org/r/20231204115710.2247097-13-arnd@kernel.org


Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Cc: Stephen Rothwell <sfr@rothwell.id.au>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent ec47b986
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -17,5 +17,11 @@
#define __read_mostly __section(".data..read_mostly")

extern void cache_noop(void);
extern void r3k_cache_init(void);
extern unsigned long r3k_cache_size(unsigned long);
extern unsigned long r3k_cache_lsize(unsigned long);
extern void r4k_cache_init(void);
extern void octeon_cache_init(void);
extern void au1x00_fixup_config_od(void);

#endif /* _ASM_CACHE_H */
+4 −0
Original line number Diff line number Diff line
@@ -24,6 +24,10 @@
#include <asm/mmzone.h>
#include <asm/unroll.h>

extern void r5k_sc_init(void);
extern void rm7k_sc_init(void);
extern int mips_sc_init(void);

extern void (*r4k_blast_dcache)(void);
extern void (*r4k_blast_icache)(void);

+0 −1
Original line number Diff line number Diff line
@@ -179,7 +179,6 @@ void __init check_bugs32(void)
static inline int cpu_has_confreg(void)
{
#ifdef CONFIG_CPU_R3000
	extern unsigned long r3k_cache_size(unsigned long);
	unsigned long size1, size2;
	unsigned long cfg = read_c0_conf();

+0 −1
Original line number Diff line number Diff line
@@ -42,7 +42,6 @@ void __init check_bugs32(void)
static inline int cpu_has_confreg(void)
{
#ifdef CONFIG_CPU_R3000
	extern unsigned long r3k_cache_size(unsigned long);
	unsigned long size1, size2;
	unsigned long cfg = read_c0_conf();

+0 −4
Original line number Diff line number Diff line
@@ -1485,10 +1485,6 @@ static void loongson3_sc_init(void)
	return;
}

extern int r5k_sc_init(void);
extern int rm7k_sc_init(void);
extern int mips_sc_init(void);

static void setup_scache(void)
{
	struct cpuinfo_mips *c = &current_cpu_data;
Loading