linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] MIPS: Limit check_bugs32() under CONFIG_32BIT
@ 2020-04-09  3:10 Tiezhu Yang
  2020-04-09  4:43 ` YunQiang Su
  0 siblings, 1 reply; 9+ messages in thread
From: Tiezhu Yang @ 2020-04-09  3:10 UTC (permalink / raw)
  To: Thomas Bogendoerfer; +Cc: linux-mips, linux-kernel, Xuefeng Li

There is no need to build and call check_bugs32() under CONFIG_64BIT,
just limit it under CONFIG_32BIT.

Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
---
 arch/mips/include/asm/bugs.h | 4 +++-
 arch/mips/kernel/cpu-probe.c | 2 ++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/arch/mips/include/asm/bugs.h b/arch/mips/include/asm/bugs.h
index d72dc6e..5f8d2bf 100644
--- a/arch/mips/include/asm/bugs.h
+++ b/arch/mips/include/asm/bugs.h
@@ -35,7 +35,9 @@ static inline void check_bugs(void)
 	unsigned int cpu = smp_processor_id();
 
 	cpu_data[cpu].udelay_val = loops_per_jiffy;
-	check_bugs32();
+
+	if (IS_ENABLED(CONFIG_32BIT))
+		check_bugs32();
 
 	if (IS_ENABLED(CONFIG_CPU_R4X00_BUGS64))
 		check_bugs64();
diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c
index f21a230..85d7273 100644
--- a/arch/mips/kernel/cpu-probe.c
+++ b/arch/mips/kernel/cpu-probe.c
@@ -461,6 +461,7 @@ static inline void cpu_set_mt_per_tc_perf(struct cpuinfo_mips *c)
 		c->options |= MIPS_CPU_MT_PER_TC_PERF_COUNTERS;
 }
 
+#ifdef CONFIG_32BIT
 static inline void check_errata(void)
 {
 	struct cpuinfo_mips *c = &current_cpu_data;
@@ -484,6 +485,7 @@ void __init check_bugs32(void)
 {
 	check_errata();
 }
+#endif /* CONFIG_32BIT */
 
 /*
  * Probe whether cpu has config register by trying to play with
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-04-11 10:39 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-09  3:10 [PATCH] MIPS: Limit check_bugs32() under CONFIG_32BIT Tiezhu Yang
2020-04-09  4:43 ` YunQiang Su
2020-04-09  7:09   ` Jiaxun Yang
2020-04-09 15:07     ` Maciej W. Rozycki
2020-04-09 15:47       ` Jiaxun Yang
2020-04-09 16:15         ` Maciej W. Rozycki
2020-04-09 20:48           ` Jiaxun Yang
2020-04-11  7:37         ` YunQiang Su
2020-04-11 10:38           ` Jiaxun Yang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).