Commit 8b793a92 authored by Ingo Molnar's avatar Ingo Molnar
Browse files

x86/cpu: Remove M486/M486SX/ELAN support



In the x86 architecture we have various complicated hardware emulation
facilities on x86-32 to support ancient 32-bit CPUs that very very few
people are using with modern kernels. This compatibility glue is sometimes
even causing problems that people spend time to resolve, which time could
be spent on other things.

As Linus recently remarked:

 > I really get the feeling that it's time to leave i486 support behind.
 > There's zero real reason for anybody to waste one second of
 > development effort on this kind of issue.

Implement the first step and remove M486/M486SX/ELAN support:

  CONFIG_M486SX
  CONFIG_M486
  CONFIG_MELAN

[ There's no recent M486=y kernel package for any mainstream x86
  32-bit distribution available that I've been able to find, so
  actual users should not be impacted, and any legacy users can
  keep using older kernels. ]

Suggested-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
Reviewed-by: default avatarArnd Bergmann <arnd@arndb.de>
Acked-by: default avatarDave Hansen <dave.hansen@linux.intel.com>
Cc: Ahmed S. Darwish <darwi@linutronix.de>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: Arnd Bergmann <arnd@kernel.org>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: John Ogness <john.ogness@linutronix.de>
Link: https://patch.msgid.link/20251214084710.3606385-2-mingo@kernel.org
parent 7aaa8047
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -446,11 +446,6 @@ config SMP
	  uniprocessor machines. On a uniprocessor machine, the kernel
	  will run faster if you say N here.

	  Note that if you say Y here and choose architecture "586" or
	  "Pentium" under "Processor family", the kernel will not work on 486
	  architectures. Similarly, multiprocessor kernels for the "PPro"
	  architecture may not work on all Pentium based boards.

	  People using multiprocessor machines who say Y here should also say
	  Y to "Enhanced Real Time Clock Support", below. The "Advanced Power
	  Management" code will be disabled if you say Y here.
@@ -2771,11 +2766,6 @@ menuconfig APM
	  manpage ("man 8 hdparm") for that), and it doesn't turn off
	  VESA-compliant "green" monitors.

	  This driver does not support the TI 4000M TravelMate and the ACER
	  486/DX4/75 because they don't have compliant BIOSes. Many "green"
	  desktop machines also don't have compliant BIOSes, and this driver
	  may cause those machines to panic during the boot phase.

	  Generally, if you don't have a battery in your machine, there isn't
	  much point in using this driver and you should say N. If you get
	  random kernel OOPSes or reboots that don't seem to be related to
+10 −34
Original line number Diff line number Diff line
@@ -8,19 +8,18 @@ choice
	  This is the processor type of your CPU. This information is
	  used for optimizing purposes. In order to compile a kernel
	  that can run on all supported x86 CPU types (albeit not
	  optimally fast), you can specify "486" here.
	  optimally fast), you can specify "586" here.

	  Note that the 386 is no longer supported, this includes
	  Note that the 386 and 486 is no longer supported, this includes
	  AMD/Cyrix/Intel 386DX/DXL/SL/SLC/SX, Cyrix/TI 486DLC/DLC2,
	  UMC 486SX-S and the NexGen Nx586.
	  UMC 486SX-S and the NexGen Nx586, AMD ELAN and all 486 based
	  CPUs.

	  The kernel will not necessarily run on earlier architectures than
	  the one you have chosen, e.g. a Pentium optimized kernel will run on
	  a PPro, but not necessarily on a i486.

	  Here are the settings recommended for greatest speed:
	  - "486" for the AMD/Cyrix/IBM/Intel 486DX/DX2/DX4 or
	    SL/SLC/SLC2/SLC3/SX/SX2 and UMC U5D or U5S.
	  - "586" for generic Pentium CPUs lacking the TSC
	    (time stamp counter) register.
	  - "Pentium-Classic" for the Intel Pentium.
@@ -46,20 +45,6 @@ choice
	  See each option's help text for additional details. If you don't know
	  what to do, choose "Pentium-Pro".

config M486SX
	bool "486SX"
	depends on X86_32
	help
	  Select this for an 486-class CPU without an FPU such as
	  AMD/Cyrix/IBM/Intel SL/SLC/SLC2/SLC3/SX/SX2 and UMC U5S.

config M486
	bool "486DX"
	depends on X86_32
	help
	  Select this for an 486-class CPU such as AMD/Cyrix/IBM/Intel
	  486DX/DX2/DX4 and UMC U5D.

config M586
	bool "586/K5/5x86/6x86/6x86MX"
	depends on X86_32
@@ -188,14 +173,6 @@ config MWINCHIP3D
	  stores for this CPU, which can increase performance of some
	  operations.

config MELAN
	bool "AMD Elan"
	depends on X86_32
	help
	  Select this for an AMD Elan processor.

	  Do not use this option for K6/Athlon/Opteron processors!

config MGEODEGX1
	bool "GeodeGX1"
	depends on X86_32
@@ -292,12 +269,12 @@ config X86_L1_CACHE_SHIFT
	int
	default "7" if MPENTIUM4
	default "6" if MK7 || MPENTIUMM || MATOM || MVIAC7 || X86_GENERIC || X86_64
	default "4" if MELAN || M486SX || M486 || MGEODEGX1
	default "4" if MGEODEGX1
	default "5" if MWINCHIP3D || MWINCHIPC6 || MCRUSOE || MEFFICEON || MCYRIXIII || MK6 || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || M586 || MVIAC3_2 || MGEODE_LX

config X86_F00F_BUG
	def_bool y
	depends on M586MMX || M586TSC || M586 || M486SX || M486
	depends on M586MMX || M586TSC || M586

config X86_INVD_BUG
	def_bool y
@@ -305,7 +282,7 @@ config X86_INVD_BUG

config X86_ALIGNMENT_16
	def_bool y
	depends on MWINCHIP3D || MWINCHIPC6 || MCYRIXIII || MELAN || MK6 || M586MMX || M586TSC || M586 || M486SX || M486 || MVIAC3_2 || MGEODEGX1
	depends on MWINCHIP3D || MWINCHIPC6 || MCYRIXIII || MK6 || M586MMX || M586TSC || M586 || MVIAC3_2 || MGEODEGX1

config X86_INTEL_USERCOPY
	def_bool y
@@ -337,12 +314,11 @@ config X86_MINIMUM_CPU_FAMILY
	int
	default "64" if X86_64
	default "6" if X86_32 && (MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7 || MEFFICEON || MATOM || MK7)
	default "5" if X86_32 && X86_CX8
	default "4"
	default "5"

config X86_DEBUGCTLMSR
	def_bool y
	depends on !(MK6 || MWINCHIPC6 || MWINCHIP3D || MCYRIXIII || M586MMX || M586TSC || M586 || M486SX || M486) && !UML
	depends on !(MK6 || MWINCHIPC6 || MWINCHIP3D || MCYRIXIII || M586MMX || M586TSC || M586) && !UML

config IA32_FEAT_CTL
	def_bool y
@@ -378,7 +354,7 @@ config CPU_SUP_INTEL
config CPU_SUP_CYRIX_32
	default y
	bool "Support Cyrix processors" if PROCESSOR_SELECT
	depends on M486SX || M486 || M586 || M586TSC || M586MMX || (EXPERT && !64BIT)
	depends on M586 || M586TSC || M586MMX || (EXPERT && !64BIT)
	help
	  This enables detection, tunings and quirks for Cyrix processors

+0 −2
Original line number Diff line number Diff line
@@ -10,8 +10,6 @@ else
align		:= -falign-functions=0 -falign-jumps=0 -falign-loops=0
endif

cflags-$(CONFIG_M486SX)		+= -march=i486
cflags-$(CONFIG_M486)		+= -march=i486
cflags-$(CONFIG_M586)		+= -march=i586
cflags-$(CONFIG_M586TSC)	+= -march=i586
cflags-$(CONFIG_M586MMX)	+= -march=pentium-mmx
+0 −6
Original line number Diff line number Diff line
@@ -5,10 +5,6 @@

#ifdef CONFIG_X86_64
/* X86_64 does not define MODULE_PROC_FAMILY */
#elif defined CONFIG_M486SX
#define MODULE_PROC_FAMILY "486SX "
#elif defined CONFIG_M486
#define MODULE_PROC_FAMILY "486 "
#elif defined CONFIG_M586
#define MODULE_PROC_FAMILY "586 "
#elif defined CONFIG_M586TSC
@@ -31,8 +27,6 @@
#define MODULE_PROC_FAMILY "K6 "
#elif defined CONFIG_MK7
#define MODULE_PROC_FAMILY "K7 "
#elif defined CONFIG_MELAN
#define MODULE_PROC_FAMILY "ELAN "
#elif defined CONFIG_MCRUSOE
#define MODULE_PROC_FAMILY "CRUSOE "
#elif defined CONFIG_MEFFICEON