[PATCH] sh: Use unified SCHED_MC Kconfig from arch/Kconfig

Sasha Levin <[email protected]>
Newsgroups gmane.linux.ports.sh.devel,gmane.linux.kernel
Message-ID <[email protected]>
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 <[email protected]>
---
 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.