Skip to contentSkip to conversation

fixup! MIPS: SiByte: Fix missing function prototypes

PATCH New Florian Fainelli 1 participant 1 message Nov 19 MIPS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fixup! MIPS: SiByte: Fix missing function prototypes

Adopt Maciej's suggestion of moving sb1250_m3_workaround_needed() to asm/bugs.h and have that file be included to provide the definition for that function. The previous style of using IS_ENABLED() for bcm1250_m3_war() is also restored.

---
 arch/mips/include/asm/bugs.h          |  1 +
 arch/mips/include/asm/sibyte/sb1250.h |  1 -
 arch/mips/mm/tlbex.c                  | 10 +++-------
 arch/mips/sibyte/sb1250/setup.c       |  1 +
 4 files changed, 5 insertions(+), 8 deletions(-)
arch/mips/include/asm/bugs.h +1 -0
index 84be74afcb9a..04d159d4cb21 100644
@@ -17,6 +17,7 @@ extern void check_bugs64_early(void);
 
 extern void check_bugs32(void);
 extern void check_bugs64(void);
+extern int sb1250_m3_workaround_needed(void);
 
 static inline int r4k_daddiu_bug(void)
 {
arch/mips/include/asm/sibyte/sb1250.h +0 -1
index ff97e77d4fe7..1186a8b21b36 100644
@@ -38,7 +38,6 @@ void sb1_cache_error(void);
 void check_bus_watcher(void);
 #endif
 
-int sb1250_m3_workaround_needed(void);
 void sb1250_setup(void);
 void sb1250_clockevent_init(void);
 void sb1250_clocksource_init(void);
arch/mips/mm/tlbex.c +3 -7
index 03a9b03c3d3a..deaee3a3572e 100644
@@ -37,9 +37,7 @@
 #include <asm/regdef.h>
 #include <asm/uasm.h>
 #include <asm/setup.h>
-#ifdef CONFIG_SB1_PASS_2_WORKAROUNDS
-#include <asm/sibyte/sb1250.h>
-#endif
+#include <asm/bugs.h>
 #include <asm/tlbex.h>
 
 static int mips_xpa_disabled;
@@ -89,11 +87,9 @@ static inline int r4k_250MHZhwbug(void)
 
 static inline int __maybe_unused bcm1250_m3_war(void)
 {
-#ifdef CONFIG_SB1_PASS_2_WORKAROUNDS
-	return sb1250_m3_workaround_needed();
-#else
+	if (IS_ENABLED(CONFIG_SB1_PASS_2_WORKAROUNDS))
+		return sb1250_m3_workaround_needed();
 	return 0;
-#endif
 }
 
 static inline int __maybe_unused r10000_llsc_war(void)
arch/mips/sibyte/sb1250/setup.c +1 -0
index 644b19038848..26d0197ab4b4 100644
@@ -9,6 +9,7 @@
 #include <linux/string.h>
 
 #include <asm/bootinfo.h>
+#include <asm/bugs.h>
 #include <asm/cpu.h>
 #include <asm/mipsregs.h>
 #include <asm/io.h>
Signature · 1 line
2.53.0