All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86/cpu: cleanup duplicate dependencies in Kconfig
@ 2026-05-31  6:57 Julian Braha
  2026-05-31  7:05 ` Ingo Molnar
  0 siblings, 1 reply; 3+ messages in thread
From: Julian Braha @ 2026-05-31  6:57 UTC (permalink / raw)
  To: tglx, mingo, bp, dave.hansen, x86; +Cc: hpa, linux-kernel, Julian Braha

The Kconfig in the choice menu already has an 'if X86'
affecting all of the config options within the choice, meaning that each
of the individual 'depends on' statements in this file is a duplicate
dependency (dead code).

Let's leave the initial 'depends on X86_32' in the choice menu,
and remove the individual dependencies from each option.

This dead code was found by kconfirm, a static analysis tool for Kconfig.

Signed-off-by: Julian Braha <julianbraha@gmail.com>
---
 arch/x86/Kconfig.cpu | 16 ----------------
 1 file changed, 16 deletions(-)

diff --git a/arch/x86/Kconfig.cpu b/arch/x86/Kconfig.cpu
index 1377edd9a997..36c8007c1559 100644
--- a/arch/x86/Kconfig.cpu
+++ b/arch/x86/Kconfig.cpu
@@ -45,21 +45,18 @@ choice
 
 config M586TSC
 	bool "Pentium-Classic"
-	depends on X86_32
 	help
 	  Select this for a Pentium Classic processor with the RDTSC (Read
 	  Time Stamp Counter) instruction for benchmarking.
 
 config M586MMX
 	bool "Pentium-MMX"
-	depends on X86_32
 	help
 	  Select this for a Pentium with the MMX graphics/multimedia
 	  extended instructions.
 
 config M686
 	bool "Pentium-Pro"
-	depends on X86_32
 	help
 	  Select this for Intel Pentium Pro chips.  This enables the use of
 	  Pentium Pro extended instructions, and disables the init-time guard
@@ -67,7 +64,6 @@ config M686
 
 config MPENTIUMII
 	bool "Pentium-II/Celeron(pre-Coppermine)"
-	depends on X86_32
 	help
 	  Select this for Intel chips based on the Pentium-II and
 	  pre-Coppermine Celeron core.  This option enables an unaligned
@@ -77,7 +73,6 @@ config MPENTIUMII
 
 config MPENTIUMIII
 	bool "Pentium-III/Celeron(Coppermine)/Pentium-III Xeon"
-	depends on X86_32
 	help
 	  Select this for Intel chips based on the Pentium-III and
 	  Celeron-Coppermine core.  This option enables use of some
@@ -86,14 +81,12 @@ config MPENTIUMIII
 
 config MPENTIUMM
 	bool "Pentium M/Pentium Dual Core/Core Solo/Core Duo"
-	depends on X86_32
 	help
 	  Select this for Intel Pentium M (not Pentium-4 M)
 	  "Merom" Core Solo/Duo notebook chips
 
 config MPENTIUM4
 	bool "Pentium-4/Celeron(P4-based)/Pentium-4 M/older Xeon"
-	depends on X86_32
 	help
 	  Select this for Intel Pentium 4 chips.  This includes the
 	  Pentium 4, Pentium D, P4-based Celeron and Xeon, and
@@ -117,7 +110,6 @@ config MPENTIUM4
 
 config MK6
 	bool "K6/K6-II/K6-III"
-	depends on X86_32
 	help
 	  Select this for an AMD K6-family processor.  Enables use of
 	  some extended instructions, and passes appropriate optimization
@@ -125,7 +117,6 @@ config MK6
 
 config MK7
 	bool "Athlon/Duron/K7"
-	depends on X86_32
 	help
 	  Select this for an AMD Athlon K7-family processor.  Enables use of
 	  some extended instructions, and passes appropriate optimization
@@ -133,7 +124,6 @@ config MK7
 
 config MCRUSOE
 	bool "Crusoe"
-	depends on X86_32
 	help
 	  Select this for a Transmeta Crusoe processor.  Treats the processor
 	  like a 586 with TSC, and sets some GCC optimization flags (like a
@@ -141,25 +131,21 @@ config MCRUSOE
 
 config MEFFICEON
 	bool "Efficeon"
-	depends on X86_32
 	help
 	  Select this for a Transmeta Efficeon processor.
 
 config MGEODEGX1
 	bool "GeodeGX1"
-	depends on X86_32
 	help
 	  Select this for a Geode GX1 (Cyrix MediaGX) chip.
 
 config MGEODE_LX
 	bool "Geode GX/LX"
-	depends on X86_32
 	help
 	  Select this for AMD Geode GX and LX processors.
 
 config MCYRIXIII
 	bool "CyrixIII/VIA-C3"
-	depends on X86_32
 	help
 	  Select this for a Cyrix III or C3 chip.  Presently Linux and GCC
 	  treat this chip as a generic 586. Whilst the CPU is 686 class,
@@ -171,7 +157,6 @@ config MCYRIXIII
 
 config MVIAC3_2
 	bool "VIA C3-2 (Nehemiah)"
-	depends on X86_32
 	help
 	  Select this for a VIA C3 "Nehemiah". Selecting this enables usage
 	  of SSE and tells gcc to treat the CPU as a 686.
@@ -179,7 +164,6 @@ config MVIAC3_2
 
 config MVIAC7
 	bool "VIA C7"
-	depends on X86_32
 	help
 	  Select this for a VIA C7.  Selecting this uses the correct cache
 	  shift and tells gcc to treat the CPU as a 686.
-- 
2.54.0


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

end of thread, other threads:[~2026-06-02  4:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-31  6:57 [PATCH] x86/cpu: cleanup duplicate dependencies in Kconfig Julian Braha
2026-05-31  7:05 ` Ingo Molnar
2026-06-02  4:33   ` Julian Braha

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.