[PATCH 06/15] x86/cpu: Remove the CONFIG_X86_INVD_BUG quirk

Ingo Molnar
2025-12-14T08:47:45Z

Now that support for 486 CPUs is gone, remove this
quirk as well.

Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Ahmed S . Darwish <darwi@linutronix.de>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: H . Peter Anvin <hpa@zytor.com>
Cc: John Ogness <john.ogness@linutronix.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20250425084216.3913608-7-mingo@kernel.org
---
arch/x86/Kconfig.cpu | 4 ----
arch/x86/kernel/traps.c | 7 -------
2 files changed, 11 deletions(-)

diff --git a/arch/x86/Kconfig.cpu b/arch/x86/Kconfig.cpu
index 052e06fec3b1..53242bce0d27 100644
--- a/arch/x86/Kconfig.cpu
+++ b/arch/x86/Kconfig.cpu
@@ -248,10 +248,6 @@ config X86_F00F_BUG
def_bool y
depends on M586MMX || M586TSC || M586

-config X86_INVD_BUG
- def_bool y
- depends on M486SX || M486
-
config X86_ALIGNMENT_16
def_bool y
depends on MCYRIXIII || MK6 || M586MMX || M586TSC || M586 || MVIAC3_2 || MGEODEGX1
diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c
index bcf1dedc1d00..5434cba078fb 100644
--- a/arch/x86/kernel/traps.c
+++ b/arch/x86/kernel/traps.c
@@ -1473,13 +1473,6 @@ DEFINE_IDTENTRY(exc_coprocessor_error)

DEFINE_IDTENTRY(exc_simd_coprocessor_error)
{
- if (IS_ENABLED(CONFIG_X86_INVD_BUG)) {
- /* AMD 486 bug: INVD in CPL 0 raises #XF instead of #GP */
- if (!static_cpu_has(X86_FEATURE_XMM)) {
- __exc_general_protection(regs, 0);
- return;
- }
- }
math_error(regs, X86_TRAP_XF);
}

--
2.51.0