All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/10] x86: Kconfig cleanups and help text improvements
@ 2022-02-28 21:28 Mateusz Jończyk
  2022-02-28 21:28 ` [PATCH 01/10] x86/Kconfig: enable X86_X2APIC by default and improve help text Mateusz Jończyk
                   ` (9 more replies)
  0 siblings, 10 replies; 13+ messages in thread
From: Mateusz Jończyk @ 2022-02-28 21:28 UTC (permalink / raw)
  To: linux-kernel, x86; +Cc: Mateusz Jończyk

Hello,

There are some problems with the Kconfig files in the kernel. The help
text is frequently confusing and does not really describe what the
feature is about in a language that users could understand. Sometimes,
the help text was not updated after kernel or ecosystem changes.
References to something "future" or "old" are also usually given without
specifying any dates.

I have started improving the Kconfig files for x86. I'm sending the
first round of patches - what I have right now.

Greetings,
Mateusz

Mateusz Jończyk (10):
  x86/Kconfig: enable X86_X2APIC by default and improve help text
  x86/apic: fix panic message when x2APIC is not supported
  x86/Kconfig: always enable ARCH_SPARSEMEM_ENABLE
  x86/Kconfig: drop X86_32_NON_STANDARD
  x86/Kconfig: move all X86_EXTENDED_PLATFORM options together
  x86/Kconfig: update lists in X86_EXTENDED_PLATFORM
  x86/Kconfig: add help text to CONFIG_PCI_MMCONFIG
  x86/Kconfig: improve CONFIG_PCI_CNB20LE_QUIRK doc
  x86/Kconfig: document year of release of glibc 2.3.3
  x86/Kconfig: remove CONFIG_ISA_BUS

 arch/x86/Kconfig            | 129 +++++++++++++++++++-----------------
 arch/x86/kernel/apic/apic.c |   2 +-
 drivers/iio/dac/Kconfig     |   2 +-
 3 files changed, 71 insertions(+), 62 deletions(-)


base-commit: cfb92440ee71adcc2105b0890bb01ac3cddb8507
-- 
2.25.1


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

* [PATCH 01/10] x86/Kconfig: enable X86_X2APIC by default and improve help text
  2022-02-28 21:28 [PATCH 00/10] x86: Kconfig cleanups and help text improvements Mateusz Jończyk
@ 2022-02-28 21:28 ` Mateusz Jończyk
  2022-02-28 21:35   ` Randy Dunlap
  2022-02-28 21:28 ` [PATCH 02/10] x86/apic: fix panic message when x2APIC is not supported Mateusz Jończyk
                   ` (8 subsequent siblings)
  9 siblings, 1 reply; 13+ messages in thread
From: Mateusz Jończyk @ 2022-02-28 21:28 UTC (permalink / raw)
  To: linux-kernel, x86
  Cc: Mateusz Jończyk, Thomas Gleixner, Ingo Molnar,
	Borislav Petkov, Dave Hansen, H. Peter Anvin, Yinghai Lu

As many current platforms (most modern Intel CPUs and QEMU) have x2APIC
present, enable CONFIG_X86_X2APIC by default as it gives performance
and functionality benefits. Additionally, if the BIOS has already
switched APIC to x2APIC mode, but CONFIG_X86_X2APIC is disabled, the
kernel will panic in arch/x86/kernel/apic/apic.c .

Also improve the help text, which was confusing and really did not
describe what the feature is about.

Help text references and discussion:

Both Intel [1] and AMD [3] spell the name as "x2APIC", not "x2apic".

"It allows faster access to the local APIC"
        [2], chapter 2.1, page 15:
        "More efficient MSR interface to access APIC registers."

"x2APIC was introduced in Intel CPUs around 2008":
        I was unable to find specific information which Intel CPUs
        support x2APIC. Wikipedia claims it was "introduced with the
        Nehalem microarchitecture in November 2008", but I was not able
        to confirm this independently. At least some Nehalem CPUs do not
        support x2APIC [1].

        The documentation [2] is dated June 2008. Linux kernel also
        introduced x2APIC support in 2008, so the year seems to be
        right.

"and in AMD EPYC CPUs in 2019":
        [3], page 15:
        "AMD introduced an x2APIC in our EPYC 7002 Series processors for
        the first time."

"It is also frequently emulated in virtual machines, even when the host
CPU does not support it."
        [1]

"If this configuration option is disabled, the kernel will not boot on
some platforms that have x2APIC enabled."
        According to some BIOS documentation [4], the x2APIC may be
        "disabled", "enabled", or "force enabled" on this system.
        I think that "enabled" means "made available to the operating
        system, but not already turned on" and "force enabled" means
        "already switched to x2APIC mode when the OS boots". Only in the
        latter mode a kernel without CONFIG_X86_X2APIC will panic in
        validate_x2apic() in arch/x86/kernel/apic/apic.c .

        QEMU 4.2.1 and my HP laptop (bought in 2019) use the "enabled"
        mode and the kernel does not panic.

[1] "Re: [Qemu-devel] [Question] why x2apic's set by default without host sup"
        https://lists.gnu.org/archive/html/qemu-devel/2013-07/msg03527.html

[2] Intel® 64 Architecture x2APIC Specification,
        ( https://www.naic.edu/~phil/software/intel/318148.pdf )

[3] Workload Tuning Guide for AMD EPYC ™ 7002 Series Processor Based
        Servers Application Note,
        https://developer.amd.com/wp-content/resources/56745_0.80.pdf

[4] UEFI System Utilities and Shell Command Mobile Help for HPE ProLiant
        Gen10, ProLiant Gen10 Plus Servers and HPE Synergy:
        Enabling or disabling Processor x2APIC Support
        https://techlibrary.hpe.com/docs/iss/proliant-gen10-uefi/s_enable_disable_x2APIC_support.html

Signed-off-by: Mateusz Jończyk <mat.jonczyk@o2.pl>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: x86@kernel.org
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Yinghai Lu <yinghai@kernel.org>
---
 arch/x86/Kconfig | 22 +++++++++++++++++-----
 1 file changed, 17 insertions(+), 5 deletions(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 9f5bd41bf660..64d760a2b81a 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -437,15 +437,27 @@ config X86_FEATURE_NAMES
 	  If in doubt, say Y.
 
 config X86_X2APIC
-	bool "Support x2apic"
+	bool "Support CPUs with x2APIC interrupt controllers"
 	depends on X86_LOCAL_APIC && X86_64 && (IRQ_REMAP || HYPERVISOR_GUEST)
+	default y
 	help
-	  This enables x2apic support on CPUs that have this feature.
+	  x2APIC is an interrupt controller architecture, a component of which
+	  (the local APIC) is present in the CPU. It allows faster access to
+	  the local APIC and supports a larger number of CPUs in the system
+	  then the predecessors.
 
-	  This allows 32-bit apic IDs (so it can support very large systems),
-	  and accesses the local apic via MSRs not via mmio.
+	  x2APIC was introduced in Intel CPUs around 2008 and in AMD EPYC CPUs
+	  in 2019, but it can be disabled by the BIOS. It is also frequently
+	  emulated in virtual machines, even when the host CPU does not support
+	  it. Support in the CPU be checked by executing
+		cat /proc/cpuinfo | grep x2apic
 
-	  If you don't know what to do here, say N.
+	  If this configuration option is disabled, the kernel will not boot on
+	  some platforms that have x2APIC enabled.
+
+	  Say N if you know that your platform does not have x2APIC.
+
+	  Otherwise, say Y.
 
 config X86_MPPARSE
 	bool "Enable MPS table" if ACPI
-- 
2.25.1


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

* [PATCH 02/10] x86/apic: fix panic message when x2APIC is not supported
  2022-02-28 21:28 [PATCH 00/10] x86: Kconfig cleanups and help text improvements Mateusz Jończyk
  2022-02-28 21:28 ` [PATCH 01/10] x86/Kconfig: enable X86_X2APIC by default and improve help text Mateusz Jończyk
@ 2022-02-28 21:28 ` Mateusz Jończyk
  2022-02-28 21:28 ` [PATCH 03/10] x86/Kconfig: always enable ARCH_SPARSEMEM_ENABLE Mateusz Jończyk
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 13+ messages in thread
From: Mateusz Jończyk @ 2022-02-28 21:28 UTC (permalink / raw)
  To: linux-kernel, x86
  Cc: Mateusz Jończyk, Thomas Gleixner, Ingo Molnar,
	Borislav Petkov, Dave Hansen, H. Peter Anvin, Johan Hovold,
	Maciej W. Rozycki, Yinghai Lu

The correct course of action is to enable x2APIC support in the kernel,
not to disable it in the BIOS (which may be impossible).
x2APIC has performance and functionality benefits, so it is best to use
it if it is available on the platform.

Signed-off-by: Mateusz Jończyk <mat.jonczyk@o2.pl>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: x86@kernel.org
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Johan Hovold <johan@kernel.org>
Cc: "Maciej W. Rozycki" <macro@orcam.me.uk>
Cc: Yinghai Lu <yinghai@kernel.org>
---
 arch/x86/kernel/apic/apic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index b70344bf6600..840511aadbca 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -1899,7 +1899,7 @@ static int __init validate_x2apic(void)
 	/*
 	 * Checkme: Can we simply turn off x2apic here instead of panic?
 	 */
-	panic("BIOS has enabled x2apic but kernel doesn't support x2apic, please disable x2apic in BIOS.\n");
+	panic("Kernel does not support x2APIC, please recompile with CONFIG_X86_X2APIC or disable x2APIC in BIOS");
 }
 early_initcall(validate_x2apic);
 
-- 
2.25.1


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

* [PATCH 03/10] x86/Kconfig: always enable ARCH_SPARSEMEM_ENABLE
  2022-02-28 21:28 [PATCH 00/10] x86: Kconfig cleanups and help text improvements Mateusz Jończyk
  2022-02-28 21:28 ` [PATCH 01/10] x86/Kconfig: enable X86_X2APIC by default and improve help text Mateusz Jończyk
  2022-02-28 21:28 ` [PATCH 02/10] x86/apic: fix panic message when x2APIC is not supported Mateusz Jończyk
@ 2022-02-28 21:28 ` Mateusz Jończyk
  2022-02-28 21:28 ` [PATCH 04/10] x86/Kconfig: drop X86_32_NON_STANDARD Mateusz Jończyk
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 13+ messages in thread
From: Mateusz Jończyk @ 2022-02-28 21:28 UTC (permalink / raw)
  To: linux-kernel, x86
  Cc: Mateusz Jończyk, Thomas Gleixner, Ingo Molnar,
	Borislav Petkov, Dave Hansen, H. Peter Anvin, Kees Cook

It appears that (X86_64 || X86_32) is always true on x86.

This logical OR directive was introduced in
commit 6ea3038648da ("arch/x86: remove depends on CONFIG_EXPERIMENTAL")
probably by a trivial mistake.

Fixes: 6ea3038648da ("arch/x86: remove depends on CONFIG_EXPERIMENTAL")
Signed-off-by: Mateusz Jończyk <mat.jonczyk@o2.pl>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: x86@kernel.org
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Kees Cook <keescook@chromium.org>
---
 arch/x86/Kconfig | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 64d760a2b81a..727fd3998022 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -1641,7 +1641,6 @@ config ARCH_FLATMEM_ENABLE
 
 config ARCH_SPARSEMEM_ENABLE
 	def_bool y
-	depends on X86_64 || NUMA || X86_32 || X86_32_NON_STANDARD
 	select SPARSEMEM_STATIC if X86_32
 	select SPARSEMEM_VMEMMAP_ENABLE if X86_64
 
-- 
2.25.1


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

* [PATCH 04/10] x86/Kconfig: drop X86_32_NON_STANDARD
  2022-02-28 21:28 [PATCH 00/10] x86: Kconfig cleanups and help text improvements Mateusz Jończyk
                   ` (2 preceding siblings ...)
  2022-02-28 21:28 ` [PATCH 03/10] x86/Kconfig: always enable ARCH_SPARSEMEM_ENABLE Mateusz Jończyk
@ 2022-02-28 21:28 ` Mateusz Jończyk
  2022-02-28 21:28 ` [PATCH 05/10] x86/Kconfig: move all X86_EXTENDED_PLATFORM options together Mateusz Jończyk
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 13+ messages in thread
From: Mateusz Jończyk @ 2022-02-28 21:28 UTC (permalink / raw)
  To: linux-kernel, x86
  Cc: Mateusz Jończyk, Thomas Gleixner, Ingo Molnar,
	Borislav Petkov, Dave Hansen, H. Peter Anvin

This patch drops the "Support non-standard 32-bit SMP architectures"
configuration option. Currently, the only such an architecture is
STA2X11, so this option is useless. STA2X11 could now be selected
independently.

The dependency of X86_BIGSMP on X86_32_NON_STANDARD was dropped in
2009, in
commit 26f7ef14a76b ("x86: don't treat bigsmp as non-standard")
but the help text for X86_32_NON_STANDARD was not updated since.

CONFIG_X86_32_NON_STANDARD was used only in arch/x86/Kconfig, so it
could be dropped easily.

X86_32_NON_STANDARD depended on SMP, so
        (!SMP && !X86_32_NON_STANDARD) == !SMP
and
        (SMP || X86_32_NON_STANDARD) == SMP

Signed-off-by: Mateusz Jończyk <mat.jonczyk@o2.pl>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: x86@kernel.org
Cc: "H. Peter Anvin" <hpa@zytor.com>
---
 arch/x86/Kconfig | 19 ++++---------------
 1 file changed, 4 insertions(+), 15 deletions(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 727fd3998022..61b58e24dc00 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -724,18 +724,6 @@ config X86_RDC321X
 	  as R-8610-(G).
 	  If you don't have one of these chips, you should say N here.
 
-config X86_32_NON_STANDARD
-	bool "Support non-standard 32-bit SMP architectures"
-	depends on X86_32 && SMP
-	depends on X86_EXTENDED_PLATFORM
-	help
-	  This option compiles in the bigsmp and STA2X11 default
-	  subarchitectures.  It is intended for a generic binary
-	  kernel. If you select them all, kernel will probe it one by
-	  one and will fallback to default.
-
-# Alphabetically sorted list of Non standard 32 bit platforms
-
 config X86_SUPPORTS_MEMORY_FAILURE
 	def_bool y
 	# MCE code calls memory_failure():
@@ -747,7 +735,8 @@ config X86_SUPPORTS_MEMORY_FAILURE
 
 config STA2X11
 	bool "STA2X11 Companion Chip Support"
-	depends on X86_32_NON_STANDARD && PCI
+	depends on X86_32 && SMP
+	depends on X86_EXTENDED_PLATFORM && PCI
 	select SWIOTLB
 	select MFD_STA2X11
 	select GPIOLIB
@@ -1074,7 +1063,7 @@ config UP_LATE_INIT
 config X86_UP_APIC
 	bool "Local APIC support on uniprocessors" if !PCI_MSI
 	default PCI_MSI
-	depends on X86_32 && !SMP && !X86_32_NON_STANDARD
+	depends on X86_32 && !SMP
 	help
 	  A local APIC (Advanced Programmable Interrupt Controller) is an
 	  integrated interrupt controller in the CPU. If you have a single-CPU
@@ -1099,7 +1088,7 @@ config X86_UP_IOAPIC
 
 config X86_LOCAL_APIC
 	def_bool y
-	depends on X86_64 || SMP || X86_32_NON_STANDARD || X86_UP_APIC || PCI_MSI
+	depends on X86_64 || SMP || X86_UP_APIC || PCI_MSI
 	select IRQ_DOMAIN_HIERARCHY
 	select PCI_MSI_IRQ_DOMAIN if PCI_MSI
 
-- 
2.25.1


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

* [PATCH 05/10] x86/Kconfig: move all X86_EXTENDED_PLATFORM options together
  2022-02-28 21:28 [PATCH 00/10] x86: Kconfig cleanups and help text improvements Mateusz Jończyk
                   ` (3 preceding siblings ...)
  2022-02-28 21:28 ` [PATCH 04/10] x86/Kconfig: drop X86_32_NON_STANDARD Mateusz Jończyk
@ 2022-02-28 21:28 ` Mateusz Jończyk
  2022-02-28 21:28 ` [PATCH 06/10] x86/Kconfig: update lists in X86_EXTENDED_PLATFORM Mateusz Jończyk
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 13+ messages in thread
From: Mateusz Jończyk @ 2022-02-28 21:28 UTC (permalink / raw)
  To: linux-kernel, x86
  Cc: Mateusz Jończyk, Thomas Gleixner, Ingo Molnar,
	Borislav Petkov, Dave Hansen, H. Peter Anvin

so that these options will be displayed together in menuconfig etc.

Signed-off-by: Mateusz Jończyk <mat.jonczyk@o2.pl>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: x86@kernel.org
Cc: "H. Peter Anvin" <hpa@zytor.com>
---
 arch/x86/Kconfig | 50 ++++++++++++++++++++++++------------------------
 1 file changed, 25 insertions(+), 25 deletions(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 61b58e24dc00..ddbc407976fb 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -660,6 +660,31 @@ config X86_INTEL_QUARK
 	  Say Y here if you have a Quark based system such as the Arduino
 	  compatible Intel Galileo.
 
+config X86_RDC321X
+	bool "RDC R-321x SoC"
+	depends on X86_32
+	depends on X86_EXTENDED_PLATFORM
+	select M486
+	select X86_REBOOTFIXUPS
+	help
+	  This option is needed for RDC R-321x system-on-chip, also known
+	  as R-8610-(G).
+	  If you don't have one of these chips, you should say N here.
+
+config STA2X11
+	bool "STA2X11 Companion Chip Support"
+	depends on X86_32 && SMP
+	depends on X86_EXTENDED_PLATFORM && PCI
+	select SWIOTLB
+	select MFD_STA2X11
+	select GPIOLIB
+	help
+	  This adds support for boards based on the STA2X11 IO-Hub,
+	  a.k.a. "ConneXt". The chip is used in place of the standard
+	  PC chipset, so all "standard" peripherals are missing. If this
+	  option is selected the kernel will still be able to boot on
+	  standard PC machines.
+
 config X86_INTEL_LPSS
 	bool "Intel Low Power Subsystem Support"
 	depends on X86 && ACPI && PCI
@@ -713,17 +738,6 @@ config IOSF_MBI_DEBUG
 
 	  If you don't require the option or are in doubt, say N.
 
-config X86_RDC321X
-	bool "RDC R-321x SoC"
-	depends on X86_32
-	depends on X86_EXTENDED_PLATFORM
-	select M486
-	select X86_REBOOTFIXUPS
-	help
-	  This option is needed for RDC R-321x system-on-chip, also known
-	  as R-8610-(G).
-	  If you don't have one of these chips, you should say N here.
-
 config X86_SUPPORTS_MEMORY_FAILURE
 	def_bool y
 	# MCE code calls memory_failure():
@@ -733,20 +747,6 @@ config X86_SUPPORTS_MEMORY_FAILURE
 	depends on X86_64 || !SPARSEMEM
 	select ARCH_SUPPORTS_MEMORY_FAILURE
 
-config STA2X11
-	bool "STA2X11 Companion Chip Support"
-	depends on X86_32 && SMP
-	depends on X86_EXTENDED_PLATFORM && PCI
-	select SWIOTLB
-	select MFD_STA2X11
-	select GPIOLIB
-	help
-	  This adds support for boards based on the STA2X11 IO-Hub,
-	  a.k.a. "ConneXt". The chip is used in place of the standard
-	  PC chipset, so all "standard" peripherals are missing. If this
-	  option is selected the kernel will still be able to boot on
-	  standard PC machines.
-
 config X86_32_IRIS
 	tristate "Eurobraille/Iris poweroff module"
 	depends on X86_32
-- 
2.25.1


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

* [PATCH 06/10] x86/Kconfig: update lists in X86_EXTENDED_PLATFORM
  2022-02-28 21:28 [PATCH 00/10] x86: Kconfig cleanups and help text improvements Mateusz Jończyk
                   ` (4 preceding siblings ...)
  2022-02-28 21:28 ` [PATCH 05/10] x86/Kconfig: move all X86_EXTENDED_PLATFORM options together Mateusz Jończyk
@ 2022-02-28 21:28 ` Mateusz Jończyk
  2022-02-28 21:28 ` [PATCH 07/10] x86/Kconfig: add help text to CONFIG_PCI_MMCONFIG Mateusz Jończyk
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 13+ messages in thread
From: Mateusz Jończyk @ 2022-02-28 21:28 UTC (permalink / raw)
  To: linux-kernel, x86
  Cc: Mateusz Jończyk, Thomas Gleixner, Ingo Molnar,
	Borislav Petkov, Dave Hansen, H. Peter Anvin

The order of the entries matches the order they appear in Kconfig.

In 2011, AMD Elan was moved to Kconfig.cpu and the dependency on
X86_EXTENDED_PLATFORM was dropped in
commit ce9c99af8d4b ("x86, cpu: Move AMD Elan Kconfig under "Processor family"")

Support for Moorestown MID devices was removed in 2012 in
commit 1a8359e411eb ("x86/mid: Remove Intel Moorestown")

SGI 320/540 (Visual Workstation) was removed in 2014 in
commit c5f9ee3d665a ("x86, platforms: Remove SGI Visual Workstation")

Signed-off-by: Mateusz Jończyk <mat.jonczyk@o2.pl>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: x86@kernel.org
Cc: "H. Peter Anvin" <hpa@zytor.com>
---
 arch/x86/Kconfig | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index ddbc407976fb..c55a837a00ab 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -531,11 +531,11 @@ config X86_EXTENDED_PLATFORM
 	  If you enable this option then you'll be able to select support
 	  for the following (non-PC) 32 bit x86 platforms:
 		Goldfish (Android emulator)
-		AMD Elan
 		RDC R-321x SoC
-		SGI 320/540 (Visual Workstation)
 		STA2X11-based (e.g. Northville)
-		Moorestown MID devices
+		Intel CE media processor (CE4100) SoC
+		Intel MID (Mobile Internet Device)
+		Intel Quark
 
 	  If you have one of these systems, or if you want to build a
 	  generic distribution kernel, say Y here - otherwise say N.
@@ -555,6 +555,8 @@ config X86_EXTENDED_PLATFORM
 		Numascale NumaChip
 		ScaleMP vSMP
 		SGI Ultraviolet
+		Goldfish (mostly Android emulator)
+		Intel MID (Mobile Internet Device)
 
 	  If you have one of these systems, or if you want to build a
 	  generic distribution kernel, say Y here - otherwise say N.
-- 
2.25.1


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

* [PATCH 07/10] x86/Kconfig: add help text to CONFIG_PCI_MMCONFIG
  2022-02-28 21:28 [PATCH 00/10] x86: Kconfig cleanups and help text improvements Mateusz Jończyk
                   ` (5 preceding siblings ...)
  2022-02-28 21:28 ` [PATCH 06/10] x86/Kconfig: update lists in X86_EXTENDED_PLATFORM Mateusz Jończyk
@ 2022-02-28 21:28 ` Mateusz Jończyk
  2022-02-28 21:28 ` [PATCH 08/10] x86/Kconfig: improve CONFIG_PCI_CNB20LE_QUIRK doc Mateusz Jończyk
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 13+ messages in thread
From: Mateusz Jończyk @ 2022-02-28 21:28 UTC (permalink / raw)
  To: linux-kernel, x86
  Cc: Mateusz Jończyk, Thomas Gleixner, Ingo Molnar,
	Borislav Petkov, Dave Hansen, H. Peter Anvin, Jan Kiszka

This configuration option had no help text, so add it.

CONFIG_EXPERT is enabled on some distribution kernels, so people using a
distribution kernel's configuration as a starting point will see this
option.

Signed-off-by: Mateusz Jończyk <mat.jonczyk@o2.pl>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: x86@kernel.org
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Jan Kiszka <jan.kiszka@siemens.com>

---
I would like someone to confirm that PCI Express is required for
MMCONFIG support.
---
 arch/x86/Kconfig | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index c55a837a00ab..27d21ef518b0 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -2645,6 +2645,19 @@ config PCI_MMCONFIG
 	default y
 	depends on PCI && (ACPI || JAILHOUSE_GUEST)
 	depends on X86_64 || (PCI_GOANY || PCI_GOMMCONFIG)
+	help
+	  Add support for accessing the PCI configuration space as a memory
+	  mapped area. It is the recommended method if the system supports
+	  this (it must have PCI Express and ACPI for it to be available).
+
+	  In the unlikely case that enabling this configuration option causes
+	  problems, the mechanism can be switched off with the 'pci=nommconf'
+	  command line parameter.
+
+	  Say 'n' only if you are sure that your platform does not support this
+	  access method or you have problems caused by it.
+
+	  Say 'y' otherwise.
 
 config PCI_OLPC
 	def_bool y
-- 
2.25.1


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

* [PATCH 08/10] x86/Kconfig: improve CONFIG_PCI_CNB20LE_QUIRK doc
  2022-02-28 21:28 [PATCH 00/10] x86: Kconfig cleanups and help text improvements Mateusz Jończyk
                   ` (6 preceding siblings ...)
  2022-02-28 21:28 ` [PATCH 07/10] x86/Kconfig: add help text to CONFIG_PCI_MMCONFIG Mateusz Jończyk
@ 2022-02-28 21:28 ` Mateusz Jończyk
  2022-02-28 21:28 ` [PATCH 09/10] x86/Kconfig: document year of release of glibc 2.3.3 Mateusz Jończyk
  2022-02-28 21:28 ` [PATCH 10/10] x86/Kconfig: remove CONFIG_ISA_BUS Mateusz Jończyk
  9 siblings, 0 replies; 13+ messages in thread
From: Mateusz Jończyk @ 2022-02-28 21:28 UTC (permalink / raw)
  To: linux-kernel, x86
  Cc: Mateusz Jończyk, Thomas Gleixner, Ingo Molnar,
	Borislav Petkov, Dave Hansen, H. Peter Anvin, Ira W . Snyder

I was unable to find a specification of this chipset.

There is a bug report in Red Hat from 2010 [2]. From dmesg from there it
looks ServerWorks CNB20LE was a chipset (controlling the PCI root
bridge and peripherals) and it was working with Pentium III. There was
also a LKML thread from 2002 [1].

There was also some research paper from CERN listing some server
configured with it with a dual Pentium III setup. [3]

[1] Zwane Mwaikambo, Re: Problem with ServerWorks CNB20LE and lost interrupts
https://lkml.org/lkml/2002/1/11/71

[2] Bug 665109 - e100 problems on old Compaq Proliant DL320
https://bugzilla.redhat.com/show_bug.cgi?id=665109

[3] R. Hughes-Jones, S. Dallison, G. Fairey, Performance Measurements on
Gigabit Ethernet NICs and Server Quality Motherboards,
http://datatag.web.cern.ch/papers/pfldnet2003-rhj.doc

Signed-off-by: Mateusz Jończyk <mat.jonczyk@o2.pl>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: x86@kernel.org
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ira W. Snyder <ira.snyder@gmail.com>
---
 arch/x86/Kconfig | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 27d21ef518b0..212f2b9a9d91 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -2672,13 +2672,21 @@ config MMCONF_FAM10H
 	depends on X86_64 && PCI_MMCONFIG && ACPI
 
 config PCI_CNB20LE_QUIRK
-	bool "Read CNB20LE Host Bridge Windows" if EXPERT
+	bool "Support PCI hotplug with the CNB20LE chipset" if EXPERT
 	depends on PCI
 	help
 	  Read the PCI windows out of the CNB20LE host bridge. This allows
 	  PCI hotplug to work on systems with the CNB20LE chipset which do
 	  not have ACPI.
 
+	  The ServerWorks (later Broadcom) CNB20LE was a chipset designed
+	  probably for Pentium III.
+
+	  To find out if you have such a chipset, search for a PCI device with
+	  1166:0009 PCI IDs, for example by executing
+		lspci -nn | grep '1166:0009'
+	  The code is inactive if there is none.
+
 	  There's no public spec for this chipset, and this functionality
 	  is known to be incomplete.
 
-- 
2.25.1


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

* [PATCH 09/10] x86/Kconfig: document year of release of glibc 2.3.3
  2022-02-28 21:28 [PATCH 00/10] x86: Kconfig cleanups and help text improvements Mateusz Jończyk
                   ` (7 preceding siblings ...)
  2022-02-28 21:28 ` [PATCH 08/10] x86/Kconfig: improve CONFIG_PCI_CNB20LE_QUIRK doc Mateusz Jończyk
@ 2022-02-28 21:28 ` Mateusz Jończyk
  2022-02-28 21:28 ` [PATCH 10/10] x86/Kconfig: remove CONFIG_ISA_BUS Mateusz Jończyk
  9 siblings, 0 replies; 13+ messages in thread
From: Mateusz Jończyk @ 2022-02-28 21:28 UTC (permalink / raw)
  To: linux-kernel, x86
  Cc: Mateusz Jończyk, Thomas Gleixner, Ingo Molnar,
	Borislav Petkov, Dave Hansen, H. Peter Anvin, Andy Lutomirski

I wonder how many people were checking their glibc version when
considering whether to enable this option.

Signed-off-by: Mateusz Jończyk <mat.jonczyk@o2.pl>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: x86@kernel.org
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Andy Lutomirski <luto@kernel.org>
---
 arch/x86/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 212f2b9a9d91..19acc5954083 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -2283,7 +2283,7 @@ config DEBUG_HOTPLUG_CPU0
 
 config COMPAT_VDSO
 	def_bool n
-	prompt "Disable the 32-bit vDSO (needed for glibc 2.3.3)"
+	prompt "Enable workaround for glibc 2.3.2 / 2.3.3 (released in year 2003/2004)"
 	depends on COMPAT_32
 	help
 	  Certain buggy versions of glibc will crash if they are
-- 
2.25.1


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

* [PATCH 10/10] x86/Kconfig: remove CONFIG_ISA_BUS
  2022-02-28 21:28 [PATCH 00/10] x86: Kconfig cleanups and help text improvements Mateusz Jończyk
                   ` (8 preceding siblings ...)
  2022-02-28 21:28 ` [PATCH 09/10] x86/Kconfig: document year of release of glibc 2.3.3 Mateusz Jończyk
@ 2022-02-28 21:28 ` Mateusz Jończyk
  2022-02-28 23:26   ` William Breathitt Gray
  9 siblings, 1 reply; 13+ messages in thread
From: Mateusz Jończyk @ 2022-02-28 21:28 UTC (permalink / raw)
  To: linux-kernel, x86
  Cc: Mateusz Jończyk, Thomas Gleixner, Ingo Molnar,
	Borislav Petkov, Dave Hansen, H. Peter Anvin,
	William Breathitt Gray

CONFIG_ISA_BUS was used only as a dependency for a single Industrial IO
driver: CONFIG_CIO_DAC ("Measurement Computing CIO-DAC IIO driver"). At
least grepping the kernel source for "ISA_BUS" did not find any other
meaningful results.

There are more configuration options that select CONFIG_ISA_BUS_API, but
did not depend on CONFIG_ISA_BUS. Most of these are for Industrial IO and
GPIO drivers.

Signed-off-by: Mateusz Jończyk <mat.jonczyk@o2.pl>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: x86@kernel.org
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: William Breathitt Gray <vilhelm.gray@gmail.com>
---
 arch/x86/Kconfig        | 11 -----------
 drivers/iio/dac/Kconfig |  2 +-
 2 files changed, 1 insertion(+), 12 deletions(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 19acc5954083..2de46adfbde2 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -2692,17 +2692,6 @@ config PCI_CNB20LE_QUIRK
 
 	  You should say N unless you know you need this.
 
-config ISA_BUS
-	bool "ISA bus support on modern systems" if EXPERT
-	help
-	  Expose ISA bus device drivers and options available for selection and
-	  configuration. Enable this option if your target machine has an ISA
-	  bus. ISA is an older system, displaced by PCI and newer bus
-	  architectures -- if your target machine is modern, it probably does
-	  not have an ISA bus.
-
-	  If unsure, say N.
-
 # x86_64 have no ISA slots, but can have ISA-style DMA.
 config ISA_DMA_API
 	bool "ISA-style DMA support" if (X86_64 && EXPERT)
diff --git a/drivers/iio/dac/Kconfig b/drivers/iio/dac/Kconfig
index bfcf7568de32..fe0f2a93055d 100644
--- a/drivers/iio/dac/Kconfig
+++ b/drivers/iio/dac/Kconfig
@@ -264,7 +264,7 @@ config AD8801
 
 config CIO_DAC
 	tristate "Measurement Computing CIO-DAC IIO driver"
-	depends on X86 && (ISA_BUS || PC104)
+	depends on X86
 	select ISA_BUS_API
 	help
 	  Say yes here to build support for the Measurement Computing CIO-DAC
-- 
2.25.1


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

* Re: [PATCH 01/10] x86/Kconfig: enable X86_X2APIC by default and improve help text
  2022-02-28 21:28 ` [PATCH 01/10] x86/Kconfig: enable X86_X2APIC by default and improve help text Mateusz Jończyk
@ 2022-02-28 21:35   ` Randy Dunlap
  0 siblings, 0 replies; 13+ messages in thread
From: Randy Dunlap @ 2022-02-28 21:35 UTC (permalink / raw)
  To: Mateusz Jończyk, linux-kernel, x86
  Cc: Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen,
	H. Peter Anvin, Yinghai Lu

Hi--

On 2/28/22 13:28, Mateusz Jończyk wrote:
> As many current platforms (most modern Intel CPUs and QEMU) have x2APIC
> present, enable CONFIG_X86_X2APIC by default as it gives performance
> and functionality benefits. Additionally, if the BIOS has already
> switched APIC to x2APIC mode, but CONFIG_X86_X2APIC is disabled, the
> kernel will panic in arch/x86/kernel/apic/apic.c .
> 
> Also improve the help text, which was confusing and really did not
> describe what the feature is about.
> 

> 
> Signed-off-by: Mateusz Jończyk <mat.jonczyk@o2.pl>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: Borislav Petkov <bp@alien8.de>
> Cc: Dave Hansen <dave.hansen@linux.intel.com>
> Cc: x86@kernel.org
> Cc: "H. Peter Anvin" <hpa@zytor.com>
> Cc: Yinghai Lu <yinghai@kernel.org>
> ---
>  arch/x86/Kconfig | 22 +++++++++++++++++-----
>  1 file changed, 17 insertions(+), 5 deletions(-)
> 
> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> index 9f5bd41bf660..64d760a2b81a 100644
> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
> @@ -437,15 +437,27 @@ config X86_FEATURE_NAMES
>  	  If in doubt, say Y.
>  
>  config X86_X2APIC
> -	bool "Support x2apic"
> +	bool "Support CPUs with x2APIC interrupt controllers"
>  	depends on X86_LOCAL_APIC && X86_64 && (IRQ_REMAP || HYPERVISOR_GUEST)
> +	default y
>  	help
> -	  This enables x2apic support on CPUs that have this feature.
> +	  x2APIC is an interrupt controller architecture, a component of which
> +	  (the local APIC) is present in the CPU. It allows faster access to
> +	  the local APIC and supports a larger number of CPUs in the system
> +	  then the predecessors.

	  than

>  
> -	  This allows 32-bit apic IDs (so it can support very large systems),
> -	  and accesses the local apic via MSRs not via mmio.
> +	  x2APIC was introduced in Intel CPUs around 2008 and in AMD EPYC CPUs
> +	  in 2019, but it can be disabled by the BIOS. It is also frequently
> +	  emulated in virtual machines, even when the host CPU does not support
> +	  it. Support in the CPU be checked by executing

	                     CPU can be checked by executing

> +		cat /proc/cpuinfo | grep x2apic
>  
> -	  If you don't know what to do here, say N.
> +	  If this configuration option is disabled, the kernel will not boot on
> +	  some platforms that have x2APIC enabled.
> +
> +	  Say N if you know that your platform does not have x2APIC.
> +
> +	  Otherwise, say Y.
>  
>  config X86_MPPARSE
>  	bool "Enable MPS table" if ACPI

-- 
~Randy

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

* Re: [PATCH 10/10] x86/Kconfig: remove CONFIG_ISA_BUS
  2022-02-28 21:28 ` [PATCH 10/10] x86/Kconfig: remove CONFIG_ISA_BUS Mateusz Jończyk
@ 2022-02-28 23:26   ` William Breathitt Gray
  0 siblings, 0 replies; 13+ messages in thread
From: William Breathitt Gray @ 2022-02-28 23:26 UTC (permalink / raw)
  To: Mateusz Jończyk
  Cc: linux-kernel, x86, Thomas Gleixner, Ingo Molnar, Borislav Petkov,
	Dave Hansen, H. Peter Anvin

On Mon, Feb 28, 2022 at 10:28:26PM +0100, Mateusz Jończyk wrote:
> CONFIG_ISA_BUS was used only as a dependency for a single Industrial IO
> driver: CONFIG_CIO_DAC ("Measurement Computing CIO-DAC IIO driver"). At
> least grepping the kernel source for "ISA_BUS" did not find any other
> meaningful results.
> 
> There are more configuration options that select CONFIG_ISA_BUS_API, but
> did not depend on CONFIG_ISA_BUS. Most of these are for Industrial IO and
> GPIO drivers.
> 
> Signed-off-by: Mateusz Jończyk <mat.jonczyk@o2.pl>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: Borislav Petkov <bp@alien8.de>
> Cc: Dave Hansen <dave.hansen@linux.intel.com>
> Cc: x86@kernel.org
> Cc: "H. Peter Anvin" <hpa@zytor.com>
> Cc: William Breathitt Gray <vilhelm.gray@gmail.com>

For context, the Measurement Computing CIO-DAC device comes in two
form factors: PC104 and ISA. The PC104 bus is typically aimed at
embedded systems and not commonly used by general users, so the
CONFIG_PC104 Kconfig option was introduced to filter out these devices
for most users who would generally not be interested in them. Because
the CIO-DAC device is also available in an ISA form factor, I needed a
way to have the CONFIG_CIO_DAC Kconfig available even on non-PC104
systems; that's how the CONFIG_ISA_BUS Kconfig option came about.

The purpose of the CONFIG_ISA_BUS Kconfig option is filter out ISA bus
devices because few users will have an ISA bus. I suppose it does no
harm to remove that filter because users can still select CONFIG_CIO_DAC
if they want it, so I'm all right with this patch.

Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com>

> ---
>  arch/x86/Kconfig        | 11 -----------
>  drivers/iio/dac/Kconfig |  2 +-
>  2 files changed, 1 insertion(+), 12 deletions(-)
> 
> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> index 19acc5954083..2de46adfbde2 100644
> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
> @@ -2692,17 +2692,6 @@ config PCI_CNB20LE_QUIRK
>  
>  	  You should say N unless you know you need this.
>  
> -config ISA_BUS
> -	bool "ISA bus support on modern systems" if EXPERT
> -	help
> -	  Expose ISA bus device drivers and options available for selection and
> -	  configuration. Enable this option if your target machine has an ISA
> -	  bus. ISA is an older system, displaced by PCI and newer bus
> -	  architectures -- if your target machine is modern, it probably does
> -	  not have an ISA bus.
> -
> -	  If unsure, say N.
> -
>  # x86_64 have no ISA slots, but can have ISA-style DMA.
>  config ISA_DMA_API
>  	bool "ISA-style DMA support" if (X86_64 && EXPERT)
> diff --git a/drivers/iio/dac/Kconfig b/drivers/iio/dac/Kconfig
> index bfcf7568de32..fe0f2a93055d 100644
> --- a/drivers/iio/dac/Kconfig
> +++ b/drivers/iio/dac/Kconfig
> @@ -264,7 +264,7 @@ config AD8801
>  
>  config CIO_DAC
>  	tristate "Measurement Computing CIO-DAC IIO driver"
> -	depends on X86 && (ISA_BUS || PC104)
> +	depends on X86
>  	select ISA_BUS_API
>  	help
>  	  Say yes here to build support for the Measurement Computing CIO-DAC
> -- 
> 2.25.1
> 

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

end of thread, other threads:[~2022-02-28 23:26 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-28 21:28 [PATCH 00/10] x86: Kconfig cleanups and help text improvements Mateusz Jończyk
2022-02-28 21:28 ` [PATCH 01/10] x86/Kconfig: enable X86_X2APIC by default and improve help text Mateusz Jończyk
2022-02-28 21:35   ` Randy Dunlap
2022-02-28 21:28 ` [PATCH 02/10] x86/apic: fix panic message when x2APIC is not supported Mateusz Jończyk
2022-02-28 21:28 ` [PATCH 03/10] x86/Kconfig: always enable ARCH_SPARSEMEM_ENABLE Mateusz Jończyk
2022-02-28 21:28 ` [PATCH 04/10] x86/Kconfig: drop X86_32_NON_STANDARD Mateusz Jończyk
2022-02-28 21:28 ` [PATCH 05/10] x86/Kconfig: move all X86_EXTENDED_PLATFORM options together Mateusz Jończyk
2022-02-28 21:28 ` [PATCH 06/10] x86/Kconfig: update lists in X86_EXTENDED_PLATFORM Mateusz Jończyk
2022-02-28 21:28 ` [PATCH 07/10] x86/Kconfig: add help text to CONFIG_PCI_MMCONFIG Mateusz Jończyk
2022-02-28 21:28 ` [PATCH 08/10] x86/Kconfig: improve CONFIG_PCI_CNB20LE_QUIRK doc Mateusz Jończyk
2022-02-28 21:28 ` [PATCH 09/10] x86/Kconfig: document year of release of glibc 2.3.3 Mateusz Jończyk
2022-02-28 21:28 ` [PATCH 10/10] x86/Kconfig: remove CONFIG_ISA_BUS Mateusz Jończyk
2022-02-28 23:26   ` William Breathitt Gray

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.