Re: [PATCH 3/8] x86: make TSC usage unconditional
From: Brian Gerst
Date: Fri May 22 2026 - 12:30:06 EST
On Fri, May 22, 2026 at 10:44 AM Arnd Bergmann <arnd@xxxxxxxxxx> wrote:
>
> From: Arnd Bergmann <arnd@xxxxxxxx>
>
> There are multiple levels of functionality of the TSC that are checked
> for: built into the kernel, present in the CPU, reliable and probably
> more.
>
> Since the TSC-less CPUs are no longer supported in the kernel,
> remove all checks for CONFIG_TSC and X86_FEATURE_TSC and assume
> it's always there. Unfortunately the tsc_clocksource_reliable
> checks are still required though.
>
> Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
> ---
> Documentation/virt/kvm/x86/timekeeping.rst | 1 -
> arch/x86/Kconfig | 1 -
> arch/x86/Kconfig.cpu | 1 -
> arch/x86/events/msr.c | 5 ----
> arch/x86/include/asm/timex.h | 3 ---
> arch/x86/include/asm/trace_clock.h | 8 -------
> arch/x86/include/asm/tsc.h | 13 ----------
> arch/x86/kernel/Makefile | 4 ++--
> arch/x86/kernel/apic/apic.c | 23 +++++++-----------
> arch/x86/kernel/apic/io_apic.c | 22 +----------------
> arch/x86/kernel/cpu/centaur.c | 2 --
> arch/x86/kernel/cpu/common.c | 4 +---
> arch/x86/kernel/cpu/proc.c | 15 +++++-------
> arch/x86/kernel/i8253.c | 3 ---
> arch/x86/kernel/tsc.c | 28 ++--------------------
> arch/x86/lib/kaslr.c | 20 ++++------------
> arch/x86/xen/time.c | 2 --
> drivers/net/ethernet/intel/igc/igc_ptp.c | 4 ++--
> drivers/ptp/Kconfig | 2 +-
> tools/power/cpupower/debug/kernel/Makefile | 5 +---
> 20 files changed, 29 insertions(+), 137 deletions(-)
>
> diff --git a/Documentation/virt/kvm/x86/timekeeping.rst b/Documentation/virt/kvm/x86/timekeeping.rst
> index 21ae7efa29ba..e8519451000d 100644
> --- a/Documentation/virt/kvm/x86/timekeeping.rst
> +++ b/Documentation/virt/kvm/x86/timekeeping.rst
> @@ -471,7 +471,6 @@ The following feature bits are used by Linux to signal various TSC attributes,
> but they can only be taken to be meaningful for UP or single node systems.
>
> ========================= =======================================
> -X86_FEATURE_TSC The TSC is available in hardware
> X86_FEATURE_RDTSCP The RDTSCP instruction is available
> X86_FEATURE_CONSTANT_TSC The TSC rate is unchanged with P-states
> X86_FEATURE_NONSTOP_TSC The TSC does not stop in C-states
> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> index a188ed90b1ca..2fd99a5b4a68 100644
> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
> @@ -683,7 +683,6 @@ config X86_INTEL_QUARK
> depends on X86_32
> depends on X86_EXTENDED_PLATFORM
> depends on X86_PLATFORM_DEVICES
> - depends on X86_TSC
> depends on PCI
> depends on PCI_GOANY
> depends on X86_IO_APIC
> diff --git a/arch/x86/Kconfig.cpu b/arch/x86/Kconfig.cpu
> index f4a12b74bed3..fe0246477345 100644
> --- a/arch/x86/Kconfig.cpu
> +++ b/arch/x86/Kconfig.cpu
> @@ -261,7 +261,6 @@ config X86_USE_PPRO_CHECKSUM
>
> config X86_TSC
> def_bool y
> - depends on (MWINCHIP3D || MCRUSOE || MEFFICEON || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || MVIAC3_2 || MVIAC7 || MGEODEGX1 || MGEODE_LX || MATOM) || X86_64
Can't you just delete this config option since it's no longer relevant?