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 7ABC9259CAF for ; Tue, 4 Mar 2025 16:39:27 +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=1741106367; cv=none; b=CNbUwTlIu4+5lfBMY/SO8NG7Y7KpvzAv05UAsYYxMfriX4JpMPk1i1GB5jUpgA3ttw3ygepNWaUNY2608RaFFeQmaHB19mJrV4/xR5KMWJd3feyeXrMeq40MEeMA/VWKZjeHp/Rafj2m7evMXT23vz2+eFafmih1pCoRASu7R1s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741106367; c=relaxed/simple; bh=IMqs3coISKvuoh85IJeF1qEw5MCgF8yMoQNApm/kXo8=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=MDmRylZWaxNH+YXDJaGefKzUrUY1xG5cUxW5Lzl+wmDLLJqYRIPs2zfNlb3pStzlO8sH8NodIcy0AL5u9YK22NTJlr/vzIZ0p9fSoHSqUyjmh9aCwNHuE21c4yZNIA33a688eTOBmk/vAuk25xR4d1MKUibH5xY/+9U/WjuUTi0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=hZEv6Bs3; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="hZEv6Bs3" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 856D4C19425; Tue, 4 Mar 2025 16:39:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1741106366; bh=IMqs3coISKvuoh85IJeF1qEw5MCgF8yMoQNApm/kXo8=; h=Subject:To:Cc:From:Date:From; b=hZEv6Bs3+WOFhModq6XkRa4Rm7YGWJLYOh/l0Gf9Sd54SKzO9rn6csHrguR2rLM9b Yd8Zz1vePgIr2BWF7H0c+VY9qquDaQBXIv2QV1DmZeP31SjfRxiyLe6SsPX9+LFOsq +PA62LPR3vjxByWFhq9DPWcnrHsXzXrZL6ZLqyCM= Subject: FAILED: patch "[PATCH] intel_idle: Handle older CPUs, which stop the TSC in deeper C" failed to apply to 5.15-stable tree To: tglx@linutronix.de,fabstz-it@yahoo.fr,rafael.j.wysocki@intel.com,stable@vger.kernel.org Cc: From: Date: Tue, 04 Mar 2025 17:39:16 +0100 Message-ID: <2025030416-straining-detergent-2e6d@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit The patch below does not apply to the 5.15-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.15.y git checkout FETCH_HEAD git cherry-pick -x c157d351460bcf202970e97e611cb6b54a3dd4a4 # git commit -s git send-email --to '' --in-reply-to '2025030416-straining-detergent-2e6d@gregkh' --subject-prefix 'PATCH 5.15.y' HEAD^.. Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From c157d351460bcf202970e97e611cb6b54a3dd4a4 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Tue, 25 Feb 2025 23:37:08 +0100 Subject: [PATCH] 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: 18734958e9bf ("intel_idle: Use ACPI _CST for processor models without C-state tables") Reported-by: Fab Stz Signed-off-by: Thomas Gleixner Tested-by: Fab Stz Cc: All applicable 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 diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c index 118fe1d37c22..0fdb1d1316c4 100644 --- a/drivers/idle/intel_idle.c +++ b/drivers/idle/intel_idle.c @@ -56,6 +56,7 @@ #include #include #include +#include #include #define INTEL_IDLE_VERSION "0.5.1" @@ -1799,6 +1800,9 @@ static void __init intel_idle_init_cstates_acpi(struct cpuidle_driver *drv) if (intel_idle_state_needs_timer_stop(state)) state->flags |= CPUIDLE_FLAG_TIMER_STOP; + if (cx->type > ACPI_STATE_C1 && !boot_cpu_has(X86_FEATURE_NONSTOP_TSC)) + mark_tsc_unstable("TSC halts in idle"); + state->enter = intel_idle; state->enter_s2idle = intel_idle_s2idle; }