* [PATCH] fixup! MIPS: SiByte: Fix missing function prototypes
@ 2026-11-19 17:43 Florian Fainelli
0 siblings, 0 replies; only message in thread
From: Florian Fainelli @ 2026-11-19 17:43 UTC (permalink / raw)
To: linux-mips
Cc: Florian Fainelli, Maciej W. Rozycki, Thomas Bogendoerfer, open list
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.
Suggested-by: Maciej W. Rozycki <macro@orcam.me.uk>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
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(-)
diff --git a/arch/mips/include/asm/bugs.h b/arch/mips/include/asm/bugs.h
index 84be74afcb9a..04d159d4cb21 100644
--- a/arch/mips/include/asm/bugs.h
+++ b/arch/mips/include/asm/bugs.h
@@ -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)
{
diff --git a/arch/mips/include/asm/sibyte/sb1250.h b/arch/mips/include/asm/sibyte/sb1250.h
index ff97e77d4fe7..1186a8b21b36 100644
--- a/arch/mips/include/asm/sibyte/sb1250.h
+++ b/arch/mips/include/asm/sibyte/sb1250.h
@@ -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);
diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c
index 03a9b03c3d3a..deaee3a3572e 100644
--- a/arch/mips/mm/tlbex.c
+++ b/arch/mips/mm/tlbex.c
@@ -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)
diff --git a/arch/mips/sibyte/sb1250/setup.c b/arch/mips/sibyte/sb1250/setup.c
index 644b19038848..26d0197ab4b4 100644
--- a/arch/mips/sibyte/sb1250/setup.c
+++ b/arch/mips/sibyte/sb1250/setup.c
@@ -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>
--
2.53.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-19 17:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-19 17:43 [PATCH] fixup! MIPS: SiByte: Fix missing function prototypes Florian Fainelli
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®