Skip to content

Commit c7b889c

Browse files
committed
intel_idle: Handle older CPUs, which stop the TSC in deeper C states, correctly
JIRA: https://issues.redhat.com/browse/RHEL-85522 commit c157d35 Author: Thomas Gleixner <tglx@linutronix.de> Date: Tue Feb 25 23:37:08 2025 +0100 intel_idle: Handle older CPUs, which stop the TSC in deeper C states, correctly The Intel idle driver is preferred over the ACPI processor idle driver, but fails to implement the work around for Core2 generation CPUs, where the TSC stops in C2 and deeper C-states. This causes stalls and boot delays, when the clocksource watchdog does not catch the unstable TSC before the CPU goes deep idle for the first time. The ACPI driver marks the TSC unstable when it detects that the CPU supports C2 or deeper and the CPU does not have a non-stop TSC. Add the equivivalent work around to the Intel idle driver to cure that. Fixes: 1873495 ("intel_idle: Use ACPI _CST for processor models without C-state tables") Reported-by: Fab Stz <fabstz-it@yahoo.fr> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Tested-by: Fab Stz <fabstz-it@yahoo.fr> Cc: All applicable <stable@vger.kernel.org> Closes: https://lore.kernel.org/all/10cf96aa-1276-4bd4-8966-c890377030c3@yahoo.fr Link: https://patch.msgid.link/87bjupfy7f.ffs@tglx Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: David Arcari <darcari@redhat.com>
1 parent 5cc9581 commit c7b889c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/idle/intel_idle.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
#include <asm/intel-family.h>
5656
#include <asm/mwait.h>
5757
#include <asm/spec-ctrl.h>
58+
#include <asm/tsc.h>
5859
#include <asm/fpu/api.h>
5960
#include <asm/smp.h>
6061

@@ -1809,6 +1810,9 @@ static void __init intel_idle_init_cstates_acpi(struct cpuidle_driver *drv)
18091810
if (intel_idle_state_needs_timer_stop(state))
18101811
state->flags |= CPUIDLE_FLAG_TIMER_STOP;
18111812

1813+
if (cx->type > ACPI_STATE_C1 && !boot_cpu_has(X86_FEATURE_NONSTOP_TSC))
1814+
mark_tsc_unstable("TSC halts in idle");
1815+
18121816
state->enter = intel_idle;
18131817
state->enter_dead = intel_idle_enter_dead;
18141818
state->enter_s2idle = intel_idle_s2idle;

0 commit comments

Comments
 (0)