mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vincent Mailhol <mailhol@kernel.org>
To: Thomas Gleixner <tglx@kernel.org>, Ingo Molnar <mingo@redhat.com>,
	 Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	 x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>
Cc: linux-kernel@vger.kernel.org, Vincent Mailhol <mailhol@kernel.org>
Subject: [PATCH 3/3] x86/cpu: don't gate PROCESSOR_SELECT with EXPERT
Date: Sat, 31 Oct 2026 08:51:51 +0100	[thread overview]
Message-ID: <20261031-processor_select_is_not_an_expert_feature-v1-3-6227bdbbe5a9@kernel.org> (raw)
In-Reply-To: <20261031-processor_select_is_not_an_expert_feature-v1-0-6227bdbbe5a9@kernel.org>

When doing a make oldconfig, the user might get asked questions about
processor vendors. When the goal is to build a kernel for a specific
machine, those questions are irrelevant.

PROCESSOR_SELECT is a nice candidate to configure the CPU vendors once
and for all, but that feature is gated by EXPERT. It is unclear why this
menu should be hidden from the normal users. In comparison with the
other EXPERT features, knowing your CPU vendor does not require advanced
knowledge. After all, most machines even have a sticker on them to
remind you what is "inside".

Remove the EXPERT dependency from PROCESSOR_SELECT. Make the option N by
default so that all x86 CPU types remain supported by default.

This preserves the current default but now makes it easy to opt out when
configuring for a specific machine.

Finally, rephrase the menu guidance to make the description clearer:

  - Change the PROCESSOR_SELECT entry text from "Supported processor
    vendors" to "Customize supported processor vendors" to better
    describe what the option does.

  - Add a paragraph to PROCESSOR_SELECT help text to clarify that N is a
    safe default.

  - For each of the CPU_SUP_* entries, remove the "If unsure, say N"
    sentence from the help text.

As a side benefit, this also allows users to more easily trim their
kernel without having to activate the EXPERT option or navigate many
submenus. This is illustrated in the measurements below done with gcc
15.3.0, which compare three builds: an x86_64 defconfig, that same
defconfig with only CONFIG_CPU_SUP_INTEL kept, then only
CONFIG_CPU_SUP_AMD kept and the other CONFIG_CPU_SUP_* deselected:

  $ size vmlinux_{defconfig,intel_only,amd_only}.o
     text      data       bss       dec       hex       filename
  29927107   4934948    752852   35614907   21f70bb   vmlinux_defconfig.o
  29819807   4919587    752340   35491734   21d8f96   vmlinux_intel_only.o
  27452359   4252858    748692   32453909   1ef3515   vmlinux_amd_only.o

This shows a 0.35% reduction on an intel-only configuration and an 8.88%
reduction for an amd-only one.

The big difference in the amd-only build size is mostly explained by the
fact that CONFIG_MITIGATION_CALL_DEPTH_TRACKING gets automatically
disabled when removing CONFIG_CPU_SUP_INTEL.

Signed-off-by: Vincent Mailhol <mailhol@kernel.org>
---
 arch/x86/Kconfig.cpu | 22 +++++-----------------
 1 file changed, 5 insertions(+), 17 deletions(-)

diff --git a/arch/x86/Kconfig.cpu b/arch/x86/Kconfig.cpu
index 6e7a366f0798..01eace1ea1f8 100644
--- a/arch/x86/Kconfig.cpu
+++ b/arch/x86/Kconfig.cpu
@@ -306,11 +306,15 @@ config X86_VMX_FEATURE_NAMES
 	depends on IA32_FEAT_CTL
 
 menuconfig PROCESSOR_SELECT
-	bool "Supported processor vendors" if EXPERT
+	default n
+	bool "Customize supported processor vendors"
 	help
 	  This lets you choose what x86 vendor support code your kernel
 	  will include.
 
+	  To compile a kernel that can run on all supported x86 CPU types,
+	  or if unsure, say N.
+
 config CPU_SUP_INTEL
 	default y
 	bool "Support Intel processors" if PROCESSOR_SELECT
@@ -322,8 +326,6 @@ config CPU_SUP_INTEL
 	  makes the kernel a tiny bit smaller. Disabling it on an Intel
 	  CPU might render the kernel unbootable.
 
-	  If unsure, say N.
-
 config CPU_SUP_CYRIX_32
 	default y
 	bool "Support Cyrix processors" if PROCESSOR_SELECT
@@ -336,8 +338,6 @@ config CPU_SUP_CYRIX_32
 	  makes the kernel a tiny bit smaller. Disabling it on a Cyrix
 	  CPU might render the kernel unbootable.
 
-	  If unsure, say N.
-
 config CPU_SUP_AMD
 	default y
 	bool "Support AMD processors" if PROCESSOR_SELECT
@@ -349,8 +349,6 @@ config CPU_SUP_AMD
 	  makes the kernel a tiny bit smaller. Disabling it on an AMD
 	  CPU might render the kernel unbootable.
 
-	  If unsure, say N.
-
 config CPU_SUP_HYGON
 	default y
 	bool "Support Hygon processors" if PROCESSOR_SELECT
@@ -363,8 +361,6 @@ config CPU_SUP_HYGON
 	  makes the kernel a tiny bit smaller. Disabling it on an Hygon
 	  CPU might render the kernel unbootable.
 
-	  If unsure, say N.
-
 config CPU_SUP_CENTAUR
 	default y
 	bool "Support Centaur processors" if PROCESSOR_SELECT
@@ -376,8 +372,6 @@ config CPU_SUP_CENTAUR
 	  makes the kernel a tiny bit smaller. Disabling it on a Centaur
 	  CPU might render the kernel unbootable.
 
-	  If unsure, say N.
-
 config CPU_SUP_TRANSMETA_32
 	default y
 	bool "Support Transmeta processors" if PROCESSOR_SELECT
@@ -390,8 +384,6 @@ config CPU_SUP_TRANSMETA_32
 	  makes the kernel a tiny bit smaller. Disabling it on a Transmeta
 	  CPU might render the kernel unbootable.
 
-	  If unsure, say N.
-
 config CPU_SUP_ZHAOXIN
 	default y
 	bool "Support Zhaoxin processors" if PROCESSOR_SELECT
@@ -403,8 +395,6 @@ config CPU_SUP_ZHAOXIN
 	  makes the kernel a tiny bit smaller. Disabling it on a Zhaoxin
 	  CPU might render the kernel unbootable.
 
-	  If unsure, say N.
-
 config CPU_SUP_VORTEX_32
 	default y
 	bool "Support Vortex processors" if PROCESSOR_SELECT
@@ -416,8 +406,6 @@ config CPU_SUP_VORTEX_32
 	  Vortex CPU. Disabling this option on other types of CPUs
 	  makes the kernel a tiny bit smaller.
 
-	  If unsure, say N.
-
 config BROADCAST_TLB_FLUSH
 	def_bool y
 	depends on CPU_SUP_AMD && 64BIT

-- 
2.56.0


  parent reply	other threads:[~2026-10-31  7:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-31  7:51 [PATCH 0/3] x86: Make processor vendor selection available without EXPERT Vincent Mailhol
2026-10-31  7:51 ` [PATCH 1/3] x86/mce: Add CPU_SUP_* dependencies for Intel/Zhaoxin MCE features Vincent Mailhol
2026-10-31  7:51 ` [PATCH 2/3] x86/numa: Add CPU_SUP_AMD dependency for legacy AMD NUMA Vincent Mailhol
2026-10-31  7:51 ` Vincent Mailhol [this message]
2026-10-31 13:58   ` [PATCH 3/3] x86/cpu: don't gate PROCESSOR_SELECT with EXPERT Dave Hansen

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=20261031-processor_select_is_not_an_expert_feature-v1-3-6227bdbbe5a9@kernel.org \
    --to=mailhol@kernel.org \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@kernel.org \
    --cc=x86@kernel.org \
    /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®