[RFC PATCH 0/15] x86: Remove support for TSC-less and CX8-less CPUs

Ingo Molnar posted 15 patches 1 year ago
Only 0 patches received!
There is a newer version of this series
Documentation/admin-guide/kernel-parameters.txt |    4 -
arch/x86/Kconfig                                |   71 +-
arch/x86/Kconfig.cpu                            |   73 +-
arch/x86/Kconfig.cpufeatures                    |    2 -
arch/x86/Makefile                               |    1 -
arch/x86/Makefile_32.cpu                        |    6 -
arch/x86/include/asm/asm-prototypes.h           |    4 -
arch/x86/include/asm/atomic64_32.h              |   17 +-
arch/x86/include/asm/cmpxchg_32.h               |   86 +-
arch/x86/include/asm/fpu/api.h                  |    6 -
arch/x86/include/asm/percpu.h                   |    6 +-
arch/x86/include/asm/vermagic.h                 |    8 -
arch/x86/kernel/cpu/common.c                    |    7 -
arch/x86/kernel/cpu/umc.c                       |   26 -
arch/x86/kernel/fpu/core.c                      |    5 -
arch/x86/kernel/fpu/init.c                      |    9 +-
arch/x86/kernel/reboot_fixups_32.c              |   14 -
arch/x86/kernel/traps.c                         |   21 -
arch/x86/lib/Makefile                           |    4 -
arch/x86/lib/atomic64_386_32.S                  |  195 ---
arch/x86/lib/cmpxchg8b_emu.S                    |   97 --
arch/x86/math-emu/Makefile                      |   30 -
arch/x86/math-emu/README                        |  427 ------
arch/x86/math-emu/control_w.h                   |   46 -
arch/x86/math-emu/div_Xsig.S                    |  367 -----
arch/x86/math-emu/div_small.S                   |   48 -
arch/x86/math-emu/errors.c                      |  686 ----------
arch/x86/math-emu/exception.h                   |   51 -
arch/x86/math-emu/fpu_arith.c                   |  153 ---
arch/x86/math-emu/fpu_asm.h                     |   32 -
arch/x86/math-emu/fpu_aux.c                     |  267 ----
arch/x86/math-emu/fpu_emu.h                     |  218 ---
arch/x86/math-emu/fpu_entry.c                   |  718 ----------
arch/x86/math-emu/fpu_etc.c                     |  136 --
arch/x86/math-emu/fpu_proto.h                   |  157 ---
arch/x86/math-emu/fpu_system.h                  |  130 --
arch/x86/math-emu/fpu_tags.c                    |  116 --
arch/x86/math-emu/fpu_trig.c                    | 1649 -----------------------
arch/x86/math-emu/get_address.c                 |  401 ------
arch/x86/math-emu/load_store.c                  |  322 -----
arch/x86/math-emu/mul_Xsig.S                    |  179 ---
arch/x86/math-emu/poly.h                        |  115 --
arch/x86/math-emu/poly_2xm1.c                   |  146 --
arch/x86/math-emu/poly_atan.c                   |  209 ---
arch/x86/math-emu/poly_l2.c                     |  245 ----
arch/x86/math-emu/poly_sin.c                    |  379 ------
arch/x86/math-emu/poly_tan.c                    |  213 ---
arch/x86/math-emu/polynom_Xsig.S                |  137 --
arch/x86/math-emu/reg_add_sub.c                 |  334 -----
arch/x86/math-emu/reg_compare.c                 |  479 -------
arch/x86/math-emu/reg_constant.c                |  123 --
arch/x86/math-emu/reg_constant.h                |   26 -
arch/x86/math-emu/reg_convert.c                 |   47 -
arch/x86/math-emu/reg_divide.c                  |  183 ---
arch/x86/math-emu/reg_ld_str.c                  | 1220 -----------------
arch/x86/math-emu/reg_mul.c                     |  116 --
arch/x86/math-emu/reg_norm.S                    |  150 ---
arch/x86/math-emu/reg_round.S                   |  711 ----------
arch/x86/math-emu/reg_u_add.S                   |  169 ---
arch/x86/math-emu/reg_u_div.S                   |  474 -------
arch/x86/math-emu/reg_u_mul.S                   |  150 ---
arch/x86/math-emu/reg_u_sub.S                   |  274 ----
arch/x86/math-emu/round_Xsig.S                  |  142 --
arch/x86/math-emu/shr_Xsig.S                    |   89 --
arch/x86/math-emu/status_w.h                    |   68 -
arch/x86/math-emu/version.h                     |   12 -
arch/x86/math-emu/wm_shrx.S                     |  207 ---
arch/x86/math-emu/wm_sqrt.S                     |  472 -------
drivers/cpufreq/Kconfig.x86                     |   26 -
drivers/cpufreq/Makefile                        |    2 -
drivers/cpufreq/elanfreq.c                      |  227 ----
drivers/cpufreq/sc520_freq.c                    |  137 --
drivers/gpio/Kconfig                            |    8 -
drivers/gpio/Makefile                           |    1 -
drivers/gpio/gpio-rdc321x.c                     |  197 ---
drivers/mfd/Kconfig                             |    9 -
drivers/mfd/Makefile                            |    1 -
drivers/mfd/rdc321x-southbridge.c               |   96 --
drivers/watchdog/Kconfig                        |   11 -
drivers/watchdog/Makefile                       |    1 -
drivers/watchdog/rdc321x_wdt.c                  |  281 ----
include/linux/mfd/rdc321x.h                     |   27 -
lib/atomic64_test.c                             |    4 +-
83 files changed, 30 insertions(+), 14683 deletions(-)
delete mode 100644 arch/x86/kernel/cpu/umc.c
delete mode 100644 arch/x86/lib/atomic64_386_32.S
delete mode 100644 arch/x86/lib/cmpxchg8b_emu.S
delete mode 100644 arch/x86/math-emu/Makefile
delete mode 100644 arch/x86/math-emu/README
delete mode 100644 arch/x86/math-emu/control_w.h
delete mode 100644 arch/x86/math-emu/div_Xsig.S
delete mode 100644 arch/x86/math-emu/div_small.S
delete mode 100644 arch/x86/math-emu/errors.c
delete mode 100644 arch/x86/math-emu/exception.h
delete mode 100644 arch/x86/math-emu/fpu_arith.c
delete mode 100644 arch/x86/math-emu/fpu_asm.h
delete mode 100644 arch/x86/math-emu/fpu_aux.c
delete mode 100644 arch/x86/math-emu/fpu_emu.h
delete mode 100644 arch/x86/math-emu/fpu_entry.c
delete mode 100644 arch/x86/math-emu/fpu_etc.c
delete mode 100644 arch/x86/math-emu/fpu_proto.h
delete mode 100644 arch/x86/math-emu/fpu_system.h
delete mode 100644 arch/x86/math-emu/fpu_tags.c
delete mode 100644 arch/x86/math-emu/fpu_trig.c
delete mode 100644 arch/x86/math-emu/get_address.c
delete mode 100644 arch/x86/math-emu/load_store.c
delete mode 100644 arch/x86/math-emu/mul_Xsig.S
delete mode 100644 arch/x86/math-emu/poly.h
delete mode 100644 arch/x86/math-emu/poly_2xm1.c
delete mode 100644 arch/x86/math-emu/poly_atan.c
delete mode 100644 arch/x86/math-emu/poly_l2.c
delete mode 100644 arch/x86/math-emu/poly_sin.c
delete mode 100644 arch/x86/math-emu/poly_tan.c
delete mode 100644 arch/x86/math-emu/polynom_Xsig.S
delete mode 100644 arch/x86/math-emu/reg_add_sub.c
delete mode 100644 arch/x86/math-emu/reg_compare.c
delete mode 100644 arch/x86/math-emu/reg_constant.c
delete mode 100644 arch/x86/math-emu/reg_constant.h
delete mode 100644 arch/x86/math-emu/reg_convert.c
delete mode 100644 arch/x86/math-emu/reg_divide.c
delete mode 100644 arch/x86/math-emu/reg_ld_str.c
delete mode 100644 arch/x86/math-emu/reg_mul.c
delete mode 100644 arch/x86/math-emu/reg_norm.S
delete mode 100644 arch/x86/math-emu/reg_round.S
delete mode 100644 arch/x86/math-emu/reg_u_add.S
delete mode 100644 arch/x86/math-emu/reg_u_div.S
delete mode 100644 arch/x86/math-emu/reg_u_mul.S
delete mode 100644 arch/x86/math-emu/reg_u_sub.S
delete mode 100644 arch/x86/math-emu/round_Xsig.S
delete mode 100644 arch/x86/math-emu/shr_Xsig.S
delete mode 100644 arch/x86/math-emu/status_w.h
delete mode 100644 arch/x86/math-emu/version.h
delete mode 100644 arch/x86/math-emu/wm_shrx.S
delete mode 100644 arch/x86/math-emu/wm_sqrt.S
delete mode 100644 drivers/cpufreq/elanfreq.c
delete mode 100644 drivers/cpufreq/sc520_freq.c
delete mode 100644 drivers/gpio/gpio-rdc321x.c
delete mode 100644 drivers/mfd/rdc321x-southbridge.c
delete mode 100644 drivers/watchdog/rdc321x_wdt.c
delete mode 100644 include/linux/mfd/rdc321x.h
[RFC PATCH 0/15] x86: Remove support for TSC-less and CX8-less CPUs
Posted by Ingo Molnar 1 year ago
* Linus Torvalds <torvalds@linux-foundation.org> wrote:

> 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.

Fully agreed!

And to turn this idea into code, here's a very raw RFC series that 
starts removing non-TSC 586 and 486 code and related support code from 
the x86 architecture, with the goal to make TSC and CX8 (CMPXCHG8B) 
support unconditionally available:

   git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git WIP.x86/cpu

The full diffstat is nice, primarily due to the removal of the math-emu 
library:

   83 files changed, 30 insertions(+), 14683 deletions(-)

But even without the math-emu/ removal and the drivers/ pruning it's a 
substantial simplification:

   20 files changed, 29 insertions(+), 629 deletions(-)

The patches most relevant to this discussion should be:

      x86/cpu: Remove M486/M486SX/ELAN support
      ...
      x86/cpu: Remove TSC-less CONFIG_M586 support
      x86/cpu: Make CONFIG_X86_TSC unconditional
      x86/cpu: Make CONFIG_X86_CX8 unconditional
      x86/percpu: Remove !CONFIG_X86_CX8 methods
      x86/atomics: Remove !CONFIG_X86_CX8 methods

If there's no big objections about the scope of removal I'll finish it 
by removing the non-TSC complications as well, and send out the series 
to lkml for further review.

( Note that some of the patches in there are still WIP, as the branch 
  name suggests. )

Thanks,

	Ingo

================>

Ingo Molnar (17):
      x86/cpu: Remove M486/M486SX/ELAN support
      x86/cpu: Remove the CONFIG_X86_INVD_BUG quirk
      x86/cpu, cpufreq: Remove AMD ELAN support
      x86/fpu: Remove MATH_EMULATION and related glue code
      x86/fpu: Remove the 'no387' boot option
      x86/fpu: Remove the math-emu/ FPU emulation library
      x86/platform: Remove CONFIG_X86_RDC321X support
      arch/x86, gpio: Remove GPIO_RDC321X support
      arch/x86, watchdog: Remove the RDC321X_WDT watchdog driver
      arch/x86, mfd: Remove MFD_RDC321X support
      x86/reboot: Remove the RDC321X reboot quirk
      x86/cpu: Remove CPU_SUP_UMC_32 support
      x86/cpu: Remove TSC-less CONFIG_M586 support
      x86/cpu: Make CONFIG_X86_TSC unconditional
      x86/cpu: Make CONFIG_X86_CX8 unconditional
      x86/percpu: Remove !X86_CX8 methods
      x86/atomics: Remove !CONFIG_X86_CX8 methods

 Documentation/admin-guide/kernel-parameters.txt |    4 -
 arch/x86/Kconfig                                |   71 +-
 arch/x86/Kconfig.cpu                            |   73 +-
 arch/x86/Kconfig.cpufeatures                    |    2 -
 arch/x86/Makefile                               |    1 -
 arch/x86/Makefile_32.cpu                        |    6 -
 arch/x86/include/asm/asm-prototypes.h           |    4 -
 arch/x86/include/asm/atomic64_32.h              |   17 +-
 arch/x86/include/asm/cmpxchg_32.h               |   86 +-
 arch/x86/include/asm/fpu/api.h                  |    6 -
 arch/x86/include/asm/percpu.h                   |    6 +-
 arch/x86/include/asm/vermagic.h                 |    8 -
 arch/x86/kernel/cpu/common.c                    |    7 -
 arch/x86/kernel/cpu/umc.c                       |   26 -
 arch/x86/kernel/fpu/core.c                      |    5 -
 arch/x86/kernel/fpu/init.c                      |    9 +-
 arch/x86/kernel/reboot_fixups_32.c              |   14 -
 arch/x86/kernel/traps.c                         |   21 -
 arch/x86/lib/Makefile                           |    4 -
 arch/x86/lib/atomic64_386_32.S                  |  195 ---
 arch/x86/lib/cmpxchg8b_emu.S                    |   97 --
 arch/x86/math-emu/Makefile                      |   30 -
 arch/x86/math-emu/README                        |  427 ------
 arch/x86/math-emu/control_w.h                   |   46 -
 arch/x86/math-emu/div_Xsig.S                    |  367 -----
 arch/x86/math-emu/div_small.S                   |   48 -
 arch/x86/math-emu/errors.c                      |  686 ----------
 arch/x86/math-emu/exception.h                   |   51 -
 arch/x86/math-emu/fpu_arith.c                   |  153 ---
 arch/x86/math-emu/fpu_asm.h                     |   32 -
 arch/x86/math-emu/fpu_aux.c                     |  267 ----
 arch/x86/math-emu/fpu_emu.h                     |  218 ---
 arch/x86/math-emu/fpu_entry.c                   |  718 ----------
 arch/x86/math-emu/fpu_etc.c                     |  136 --
 arch/x86/math-emu/fpu_proto.h                   |  157 ---
 arch/x86/math-emu/fpu_system.h                  |  130 --
 arch/x86/math-emu/fpu_tags.c                    |  116 --
 arch/x86/math-emu/fpu_trig.c                    | 1649 -----------------------
 arch/x86/math-emu/get_address.c                 |  401 ------
 arch/x86/math-emu/load_store.c                  |  322 -----
 arch/x86/math-emu/mul_Xsig.S                    |  179 ---
 arch/x86/math-emu/poly.h                        |  115 --
 arch/x86/math-emu/poly_2xm1.c                   |  146 --
 arch/x86/math-emu/poly_atan.c                   |  209 ---
 arch/x86/math-emu/poly_l2.c                     |  245 ----
 arch/x86/math-emu/poly_sin.c                    |  379 ------
 arch/x86/math-emu/poly_tan.c                    |  213 ---
 arch/x86/math-emu/polynom_Xsig.S                |  137 --
 arch/x86/math-emu/reg_add_sub.c                 |  334 -----
 arch/x86/math-emu/reg_compare.c                 |  479 -------
 arch/x86/math-emu/reg_constant.c                |  123 --
 arch/x86/math-emu/reg_constant.h                |   26 -
 arch/x86/math-emu/reg_convert.c                 |   47 -
 arch/x86/math-emu/reg_divide.c                  |  183 ---
 arch/x86/math-emu/reg_ld_str.c                  | 1220 -----------------
 arch/x86/math-emu/reg_mul.c                     |  116 --
 arch/x86/math-emu/reg_norm.S                    |  150 ---
 arch/x86/math-emu/reg_round.S                   |  711 ----------
 arch/x86/math-emu/reg_u_add.S                   |  169 ---
 arch/x86/math-emu/reg_u_div.S                   |  474 -------
 arch/x86/math-emu/reg_u_mul.S                   |  150 ---
 arch/x86/math-emu/reg_u_sub.S                   |  274 ----
 arch/x86/math-emu/round_Xsig.S                  |  142 --
 arch/x86/math-emu/shr_Xsig.S                    |   89 --
 arch/x86/math-emu/status_w.h                    |   68 -
 arch/x86/math-emu/version.h                     |   12 -
 arch/x86/math-emu/wm_shrx.S                     |  207 ---
 arch/x86/math-emu/wm_sqrt.S                     |  472 -------
 drivers/cpufreq/Kconfig.x86                     |   26 -
 drivers/cpufreq/Makefile                        |    2 -
 drivers/cpufreq/elanfreq.c                      |  227 ----
 drivers/cpufreq/sc520_freq.c                    |  137 --
 drivers/gpio/Kconfig                            |    8 -
 drivers/gpio/Makefile                           |    1 -
 drivers/gpio/gpio-rdc321x.c                     |  197 ---
 drivers/mfd/Kconfig                             |    9 -
 drivers/mfd/Makefile                            |    1 -
 drivers/mfd/rdc321x-southbridge.c               |   96 --
 drivers/watchdog/Kconfig                        |   11 -
 drivers/watchdog/Makefile                       |    1 -
 drivers/watchdog/rdc321x_wdt.c                  |  281 ----
 include/linux/mfd/rdc321x.h                     |   27 -
 lib/atomic64_test.c                             |    4 +-
 83 files changed, 30 insertions(+), 14683 deletions(-)
 delete mode 100644 arch/x86/kernel/cpu/umc.c
 delete mode 100644 arch/x86/lib/atomic64_386_32.S
 delete mode 100644 arch/x86/lib/cmpxchg8b_emu.S
 delete mode 100644 arch/x86/math-emu/Makefile
 delete mode 100644 arch/x86/math-emu/README
 delete mode 100644 arch/x86/math-emu/control_w.h
 delete mode 100644 arch/x86/math-emu/div_Xsig.S
 delete mode 100644 arch/x86/math-emu/div_small.S
 delete mode 100644 arch/x86/math-emu/errors.c
 delete mode 100644 arch/x86/math-emu/exception.h
 delete mode 100644 arch/x86/math-emu/fpu_arith.c
 delete mode 100644 arch/x86/math-emu/fpu_asm.h
 delete mode 100644 arch/x86/math-emu/fpu_aux.c
 delete mode 100644 arch/x86/math-emu/fpu_emu.h
 delete mode 100644 arch/x86/math-emu/fpu_entry.c
 delete mode 100644 arch/x86/math-emu/fpu_etc.c
 delete mode 100644 arch/x86/math-emu/fpu_proto.h
 delete mode 100644 arch/x86/math-emu/fpu_system.h
 delete mode 100644 arch/x86/math-emu/fpu_tags.c
 delete mode 100644 arch/x86/math-emu/fpu_trig.c
 delete mode 100644 arch/x86/math-emu/get_address.c
 delete mode 100644 arch/x86/math-emu/load_store.c
 delete mode 100644 arch/x86/math-emu/mul_Xsig.S
 delete mode 100644 arch/x86/math-emu/poly.h
 delete mode 100644 arch/x86/math-emu/poly_2xm1.c
 delete mode 100644 arch/x86/math-emu/poly_atan.c
 delete mode 100644 arch/x86/math-emu/poly_l2.c
 delete mode 100644 arch/x86/math-emu/poly_sin.c
 delete mode 100644 arch/x86/math-emu/poly_tan.c
 delete mode 100644 arch/x86/math-emu/polynom_Xsig.S
 delete mode 100644 arch/x86/math-emu/reg_add_sub.c
 delete mode 100644 arch/x86/math-emu/reg_compare.c
 delete mode 100644 arch/x86/math-emu/reg_constant.c
 delete mode 100644 arch/x86/math-emu/reg_constant.h
 delete mode 100644 arch/x86/math-emu/reg_convert.c
 delete mode 100644 arch/x86/math-emu/reg_divide.c
 delete mode 100644 arch/x86/math-emu/reg_ld_str.c
 delete mode 100644 arch/x86/math-emu/reg_mul.c
 delete mode 100644 arch/x86/math-emu/reg_norm.S
 delete mode 100644 arch/x86/math-emu/reg_round.S
 delete mode 100644 arch/x86/math-emu/reg_u_add.S
 delete mode 100644 arch/x86/math-emu/reg_u_div.S
 delete mode 100644 arch/x86/math-emu/reg_u_mul.S
 delete mode 100644 arch/x86/math-emu/reg_u_sub.S
 delete mode 100644 arch/x86/math-emu/round_Xsig.S
 delete mode 100644 arch/x86/math-emu/shr_Xsig.S
 delete mode 100644 arch/x86/math-emu/status_w.h
 delete mode 100644 arch/x86/math-emu/version.h
 delete mode 100644 arch/x86/math-emu/wm_shrx.S
 delete mode 100644 arch/x86/math-emu/wm_sqrt.S
 delete mode 100644 drivers/cpufreq/elanfreq.c
 delete mode 100644 drivers/cpufreq/sc520_freq.c
 delete mode 100644 drivers/gpio/gpio-rdc321x.c
 delete mode 100644 drivers/mfd/rdc321x-southbridge.c
 delete mode 100644 drivers/watchdog/rdc321x_wdt.c
 delete mode 100644 include/linux/mfd/rdc321x.h
Re: [RFC PATCH 0/15] x86: Remove support for TSC-less and CX8-less CPUs
Posted by Arnd Bergmann 1 year ago
On Thu, Apr 24, 2025, at 19:54, Ingo Molnar wrote:
> * Linus Torvalds <torvalds@linux-foundation.org> wrote:
>
>> 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.
>
> Fully agreed!
>
> And to turn this idea into code, here's a very raw RFC series that 
> starts removing non-TSC 586 and 486 code and related support code from 
> the x86 architecture, with the goal to make TSC and CX8 (CMPXCHG8B) 
> support unconditionally available:

Yes, makes sense. I had considered doing something like this in
my cleanup for large machines, but decided to keep stop there
because I know that there are users that love their museum pieces.

For embedded systems, I'm quite sure that the AMD Élan, SIS 55x,
RDC321x and Vortex86SX have ended their useful life. You may
still be able to buy Vortex86SX machines and they are probably
still running somewhere, but the entire point of those machines
is to run old software. DM&P provides patches for linux-2.6.29
and Windows CE 6.0 for the SX chips.

The desktop Socket 7 clones without CX8/TSC all got discontinued
over 25 years ago, and they were rare even then.

>       x86/platform: Remove CONFIG_X86_RDC321X support
>       arch/x86, gpio: Remove GPIO_RDC321X support
>       arch/x86, watchdog: Remove the RDC321X_WDT watchdog driver
>       arch/x86, mfd: Remove MFD_RDC321X support
>       x86/reboot: Remove the RDC321X reboot quirk

I'm not sure about the RDC321X bits. Obviously the original
321x/861x/vortex86sx chips are obsolete and can be removed,
but the product line is still actively developed by RDC and 
DM&P, and I suspect that some of the drivers are still used
on 586tsc-class (vortex86dx, vortex86mx) and 686-class
(vortex86dx3, vortex86ex) SoCs that do run modern kernels and
get updates.

>       x86/cpu: Remove CPU_SUP_UMC_32 support
>       x86/cpu: Remove TSC-less CONFIG_M586 support

I think Winchip6 (486-class, no tsc, no cx8) and Winchip3D
(486-class, with tsc but no cx8) need to go as well then.

At this point, maybe we can consider removing
CONFIG_X86_GENERIC and just always build kernels that work
across a wide set of CPUs: Only CMOV and PAE still require a
CPU with the hardware support, and X86_L1_CACHE_SHIFT needs to
be at least 6 (64 byte) for compatibility, but everything
else should just be a tuning option.

      Arnd
Re: [RFC PATCH 0/15] x86: Remove support for TSC-less and CX8-less CPUs
Posted by Ingo Molnar 1 year ago
* Arnd Bergmann <arnd@arndb.de> wrote:

> >       x86/platform: Remove CONFIG_X86_RDC321X support
> >       arch/x86, gpio: Remove GPIO_RDC321X support
> >       arch/x86, watchdog: Remove the RDC321X_WDT watchdog driver
> >       arch/x86, mfd: Remove MFD_RDC321X support
> >       x86/reboot: Remove the RDC321X reboot quirk
> 
> I'm not sure about the RDC321X bits. Obviously the original
> 321x/861x/vortex86sx chips are obsolete and can be removed,
> but the product line is still actively developed by RDC and 
> DM&P, and I suspect that some of the drivers are still used
> on 586tsc-class (vortex86dx, vortex86mx) and 686-class
> (vortex86dx3, vortex86ex) SoCs that do run modern kernels and
> get updates.

So CONFIG_X86_RDC321X actively selects M486:

+++ b/arch/x86/Kconfig
 
 config X86_RDC321X
        bool "RDC R-321x SoC"
        depends on X86_32
        depends on X86_EXTENDED_PLATFORM
        select M486
        ^^^^^^^^^^^
        select X86_REBOOTFIXUPS

But indeed the other drivers are not dependent on M486, at least 
overtly:

  arch/x86, mfd: Remove MFD_RDC321X support
  arch/x86, watchdog: Remove the RDC321X_WDT watchdog driver
  arch/x86, gpio: Remove GPIO_RDC321X support

Although the watchdog driver has this indirect dependency:

   drivers/watchdog/Kconfig:       depends on X86_RDC321X || COMPILE_TEST

But the 486 kernel would work on any 586/686 upgraded boards as well.

Anyway, I've dropped the mfd/watchdog/gpio removal patches, no harm in 
keeping these drivers, and I've switched the watchdog driver over to 
X86_32:

  config RDC321X_WDT
        tristate "RDC R-321x SoC watchdog"
        depends on X86_32 || COMPILE_TEST

There's also no harm in keeping the southbridge reboot quirk I suppose, 
so I've dropped this as well:

  x86/reboot: Remove the RDC321X reboot quirk


> >       x86/cpu: Remove CPU_SUP_UMC_32 support
> >       x86/cpu: Remove TSC-less CONFIG_M586 support
> 
> I think Winchip6 (486-class, no tsc, no cx8) and Winchip3D
> (486-class, with tsc but no cx8) need to go as well then.

Okay, agreed, I've added this patch to the tree:

  bf82539ad9f6 x86/cpu: Remove CONFIG_MWINCHIP3D/MWINCHIPC6

  arch/x86/Kconfig.cpu            | 28 ++++------------------------
  arch/x86/Makefile_32.cpu        |  2 --
  arch/x86/include/asm/vermagic.h |  4 ----
  3 files changed, 4 insertions(+), 30 deletions(-)

> At this point, maybe we can consider removing CONFIG_X86_GENERIC and 
> just always build kernels that work across a wide set of CPUs: Only 
> CMOV and PAE still require a CPU with the hardware support, and 
> X86_L1_CACHE_SHIFT needs to be at least 6 (64 byte) for 
> compatibility, but everything else should just be a tuning option.

Agreed.

Thanks,

	Ingo
Re: [RFC PATCH 0/15] x86: Remove support for TSC-less and CX8-less CPUs
Posted by Arnd Bergmann 1 year ago
On Fri, Apr 25, 2025, at 09:40, Ingo Molnar wrote:
> * Arnd Bergmann <arnd@arndb.de> wrote:
>
>> >       x86/platform: Remove CONFIG_X86_RDC321X support
>> >       arch/x86, gpio: Remove GPIO_RDC321X support
>> >       arch/x86, watchdog: Remove the RDC321X_WDT watchdog driver
>> >       arch/x86, mfd: Remove MFD_RDC321X support
>> >       x86/reboot: Remove the RDC321X reboot quirk
>> 
>> I'm not sure about the RDC321X bits. Obviously the original
>> 321x/861x/vortex86sx chips are obsolete and can be removed,
>> but the product line is still actively developed by RDC and 
>> DM&P, and I suspect that some of the drivers are still used
>> on 586tsc-class (vortex86dx, vortex86mx) and 686-class
>> (vortex86dx3, vortex86ex) SoCs that do run modern kernels and
>> get updates.
>
> So CONFIG_X86_RDC321X actively selects M486:
>
> +++ b/arch/x86/Kconfig
> 
>  config X86_RDC321X
>         bool "RDC R-321x SoC"
>         depends on X86_32
>         depends on X86_EXTENDED_PLATFORM
>         select M486
>         ^^^^^^^^^^^
>         select X86_REBOOTFIXUPS

Right, when the code got added, it was certainly for that
specific chip, which I think is 486SX compatible.

The 'select M486' here doesn't actually do anything because
Kconfig silently ignores 'select' for 'choice' symbols.

> But indeed the other drivers are not dependent on M486, at least 
> overtly:
>
>   arch/x86, mfd: Remove MFD_RDC321X support
>   arch/x86, watchdog: Remove the RDC321X_WDT watchdog driver
>   arch/x86, gpio: Remove GPIO_RDC321X support
>
> Although the watchdog driver has this indirect dependency:
>
>    drivers/watchdog/Kconfig:       depends on X86_RDC321X || COMPILE_TEST

> Anyway, I've dropped the mfd/watchdog/gpio removal patches, no harm in 
> keeping these drivers.

Thanks. We should still revisit all these separately and see which
ones are used on more modern RDC/Vortex86 chips, as the relation
between the brands isn't well documented.

I found an older lspci output from Xcore86MX/Vortex86MX showing
that is uses an RDC R6021/R6036 bridge instead of R6020/R6030
on the RDC321x:

https://lore.kernel.org/all/4CC80AF3.9040708@croler.net/

The Vortex86DX (585tsc compatible) datasheet in turn lists
an R6021/R6031, which means the driver won't work out of the box,
but it's probably not far off either if someone just adds
the PCI ID.

Clearly nobody has done that so far, which would indicate that
not a lot of people run vortex86 /and/ realize it's related
to rdc321x.

> and I've switched the watchdog driver over to X86_32:
>
>   config RDC321X_WDT
>         tristate "RDC R-321x SoC watchdog"
>         depends on X86_32 || COMPILE_TEST

How about 'CPU_SUP_VORTEX_32 || COMPILE_TEST'?

> There's also no harm in keeping the southbridge reboot quirk I suppose, 
> so I've dropped this as well:
>
>   x86/reboot: Remove the RDC321X reboot quirk

Right. Same thing here: the code probably still works on later
R603x south bridges, but only triggers on the R6030 PCI ID
that is not used on supported chips. Most likely nothing
needs it.

    Arnd
Re: [RFC PATCH 0/15] x86: Remove support for TSC-less and CX8-less CPUs
Posted by Ingo Molnar 1 year ago
* Ingo Molnar <mingo@kernel.org> wrote:

> The patches most relevant to this discussion should be:
> 
>       x86/cpu: Remove M486/M486SX/ELAN support
>       ...
>       x86/cpu: Remove TSC-less CONFIG_M586 support
>       x86/cpu: Make CONFIG_X86_TSC unconditional
>       x86/cpu: Make CONFIG_X86_CX8 unconditional
>       x86/percpu: Remove !CONFIG_X86_CX8 methods
>       x86/atomics: Remove !CONFIG_X86_CX8 methods

also:

>       x86/cpu: Remove TSC-less CONFIG_M586 support

Thanks,

	Ingo