public inbox for linux-sh@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sh: Use unified SCHED_MC Kconfig from arch/Kconfig
@ 2026-04-26  0:03 Sasha Levin
  0 siblings, 0 replies; only message in thread
From: Sasha Levin @ 2026-04-26  0:03 UTC (permalink / raw)
  To: Yoshinori Sato
  Cc: Rich Felker, John Paul Adrian Glaubitz, Sasha Levin, linux-sh,
	linux-kernel

kconfiglint reports:

  K008: config SCHED_MC has prompts in 2 separate definitions

SCHED_MC is defined in two places:

  arch/Kconfig:73 — generic definition, depends on ARCH_SUPPORTS_SCHED_MC
  arch/sh/mm/Kconfig:185 — SH-specific definition, depends on SMP

The SH-specific SCHED_MC was introduced in commit 896f0c0e8e4e ("sh:
Support SCHED_MC for SH-X3 multi-cores.") before the
generic ARCH_SUPPORTS_SCHED_MC mechanism existed in arch/Kconfig.

Commit 7bd291abe2da ("sched: Unify the SCHED_{SMT,CLUSTER,MC} Kconfig")
consolidated SCHED_MC definitions across most architectures into the
generic arch/Kconfig version. That commit did not touch SH because SH had
not opted into the unified mechanism by selecting ARCH_SUPPORTS_SCHED_MC.

Complete the unification for SH by:
1. Adding `select ARCH_SUPPORTS_SCHED_MC if SMP` to the SUPERH config
2. Removing the SH-specific SCHED_MC from arch/sh/mm/Kconfig

This is functionally equivalent: both definitions depend on SMP (the
generic one via ARCH_SUPPORTS_SCHED_MC, which we now gate on SMP) and
both default to y.

Assisted-by: Claude:claude-opus-4-6 kconfiglint
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/sh/Kconfig    | 1 +
 arch/sh/mm/Kconfig | 9 ---------
 2 files changed, 1 insertion(+), 9 deletions(-)

diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
index d5795067befaa..cf8437738a7bd 100644
--- a/arch/sh/Kconfig
+++ b/arch/sh/Kconfig
@@ -13,6 +13,7 @@ config SUPERH
 	select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
 	select ARCH_HIBERNATION_POSSIBLE if MMU
 	select ARCH_MIGHT_HAVE_PC_PARPORT
+	select ARCH_SUPPORTS_SCHED_MC if SMP
 	select ARCH_WANT_IPC_PARSE_VERSION
 	select ARCH_NEED_CMPXCHG_1_EMU
 	select CPU_NO_EFFICIENT_FFS
diff --git a/arch/sh/mm/Kconfig b/arch/sh/mm/Kconfig
index 1862411665ab8..e6762a0e46e59 100644
--- a/arch/sh/mm/Kconfig
+++ b/arch/sh/mm/Kconfig
@@ -182,15 +182,6 @@ config HUGETLB_PAGE_SIZE_64MB
 
 endchoice
 
-config SCHED_MC
-	bool "Multi-core scheduler support"
-	depends on SMP
-	default y
-	help
-	  Multi-core scheduler support improves the CPU scheduler's decision
-	  making when dealing with multi-core CPU chips at a cost of slightly
-	  increased overhead in some places. If unsure say N here.
-
 endmenu
 
 menu "Cache configuration"
-- 
2.53.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-04-26  0:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-26  0:03 [PATCH] sh: Use unified SCHED_MC Kconfig from arch/Kconfig Sasha Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox