mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: linux-mips@vger.kernel.org
Cc: Florian Fainelli <f.fainelli@gmail.com>,
	"Maciej W. Rozycki" <macro@orcam.me.uk>,
	Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
	linux-kernel@vger.kernel.org (open list)
Subject: [PATCH] fixup! MIPS: SiByte: Fix missing function prototypes
Date: Thu, 19 Nov 2026 09:43:18 -0800	[thread overview]
Message-ID: <20261119174327.220291-1-f.fainelli@gmail.com> (raw)

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


                 reply	other threads:[~2026-11-19 17:43 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261119174327.220291-1-f.fainelli@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=macro@orcam.me.uk \
    --cc=tsbogend@alpha.franken.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®