From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 12B6421C9F9 for ; Sun, 14 Dec 2025 08:47:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765702044; cv=none; b=EcTgLj9GwLoACktPdOVNpK03yHdPLGu3TmW5NvMPl+DNHeUxoSI8sjjcB50DqjzRuIr39VsuEliKP/T2n8CXM+UdXKeCJ93YUGug35DpyzRQShT4gZ8CXTk8VfURHHuHpFQcQmOWU59MMeVcpZXa/qD64M8d7odYzfMQ5dqn5LE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765702044; c=relaxed/simple; bh=PvfQSbKCjUVGli+uIrgdLm2kCQ6tzoj1E3kLHWz+Fts=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=PbPXekn24PHUcb+em13Hq4MV/2TRLqAYJ60otVB1Nh92un5te501xyW6GlFGugVrSG9EKSDWGDciluctq5Lh23+E34wiVZvqrIJLxIQNDBaef0e/LXCyi4VXoTSBoNqarFAF66FMRHF9pKXV2pQKeN/gZYnN9EV4Hf5oGu4bIFQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=TEL1ux2a; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="TEL1ux2a" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 75530C4CEF1; Sun, 14 Dec 2025 08:47:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1765702043; bh=PvfQSbKCjUVGli+uIrgdLm2kCQ6tzoj1E3kLHWz+Fts=; h=From:To:Cc:Subject:Date:From; b=TEL1ux2a9LuHG3qLkZbSP5j9DpAHQ+/LDmqPpzVMuVqsNaELXJpiTNr2SpYWlAQ8/ duqjtgnJgpCA3VhR6t4Yf99NJYynL78b675g5b32IzXItN/PAfqZ+TgoYFuPssuSIT gMplY9ZxU83+Z1mUk8skGiyTAGI2eXPgBEsAg8NWArShyhqg/O+ksN7Z6PcNN/tXas 9UPnDNaNWqmtZZgr4xzia0L+kgIIt5ivtras6caqbuLQ32GNXmN2wOR+UKxc0w18kd pbyhS99kKUHdVeM1NfNVgHtFvSFm9Ff2C2gI7KCBi5m92u0Nxzfcfo1apr0EP6rDWs eW4ZyNU3wg6zQ== From: Ingo Molnar To: linux-kernel@vger.kernel.org Cc: Ingo Molnar , "Ahmed S . Darwish" , Andrew Cooper , Ard Biesheuvel , Arnd Bergmann , Borislav Petkov , Dave Hansen , "H . Peter Anvin" , John Ogness , Linus Torvalds , Peter Zijlstra , Thomas Gleixner Subject: [PATCH -v3 0/15] x86: Remove support for TSC-less and CX8-less CPUs Date: Sun, 14 Dec 2025 09:46:48 +0100 Message-ID: <20251214084710.3606385-1-mingo@kernel.org> X-Mailer: git-send-email 2.51.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Changes in -v3: - Port to v6.19-rc1 Changes in -v2: - Rebase to v6.15-rc6 + the relevant x86 tree branch - Use proper asm() constraints in the simplified CX8 methods (Uros Bizjak) - Remove stray family-4 default (suggested by Arnd Bergmann) - Simplify CX8 test (suggested by Uros Bizjak) - Add review tags The latest version of this series can be found at: git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git WIP.x86/cpu Thanks, Ingo =============> Original -v1 announcement: 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. This series increases minimum kernel support features to include TSC and CX8 (CMPXCHG8B) hardware support, which removes 486 (and derivatives) support and early-586 (and derivatives) support. Doing this allows the removal of a fair amount of code: 80 files changed, 38 insertions(+), 14104 deletions(-) Much of which is the math-emu/ library - but even without math-emu, the simplification is substantial: 33 files changed, 38 insertions(+), 1081 deletions(-) This series has 5 main parts: 1) Removal of the main CPU options and their dependencies in the Kconfig space: x86/cpu: Remove M486/M486SX/ELAN support x86/cpu: Remove CONFIG_MWINCHIP3D/MWINCHIPC6 x86/cpu: Remove CPU_SUP_UMC_32 support x86/cpu: Remove TSC-less CONFIG_M586 support 2) Remove platform support for chips that weren't carried forward after these CPUs: x86/cpu, x86/platform, watchdog: Remove CONFIG_X86_RDC321X support x86/cpu: Remove the CONFIG_X86_INVD_BUG quirk x86/cpu, cpufreq: Remove AMD ELAN support 3) Remove math-emu/ 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 4) Make CONFIG_X86_TSC unconditional and simplify the build-time TSC variances: x86/cpu: Make CONFIG_X86_TSC unconditional x86: Remove !CONFIG_X86_TSC code Note that runtime TSC disabling is still kept in its various forms. Also note that I kept CONFIG_X86_TSC itself, which is a proxy for a few drivers for 'sane x86', and which might be used in changes still in-flight. There's very little cost to keep this Kconfig option going forward, even though it's always-enabled. 5) Make CONFIG_X86_CX8 unconditional and remove build-time complications: x86/cpu: Make CONFIG_X86_CX8 unconditional x86/percpu: Remove !CONFIG_X86_CX8 methods x86/atomics: Remove !CONFIG_X86_CX8 methods Note that CONFIG_X86_CX8 is still kept, but not used by anything anymore. We can probably remove it entirely and there's no expectation of pending/outside code having dependency on this. Note that there's still some stray references to removed platforms in the main x86 Kconfig and Kconfig.x86, and the entire vector of CPU options is probably overly complicated and should probably be replaced with a single option - I'll clean that all up once there's rough agreement about the scope of this RFC series. The tree can also be found in my tree: git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git WIP.x86/cpu Lightly tested. Thanks, Ingo ================>