mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andre Eikmeyer <dev@deq.rocks>
To: tglx@kernel.org, mingo@redhat.com, bp@alien8.de,
	dave.hansen@linux.intel.com, x86@kernel.org
Cc: hpa@zytor.com, linux-kernel@vger.kernel.org, rafael@kernel.org,
	linux-pm@vger.kernel.org, lukas@wunner.de, yu.c.chen@intel.com,
	Andre Eikmeyer <dev@deq.rocks>
Subject: [PATCH] x86/cache: Restore AP cache state while bringing CPUs online on resume
Date: Wed, 11 Nov 2026 13:37:47 +0100	[thread overview]
Message-ID: <20261111123747.49446-1-dev@deq.rocks> (raw)

Some platform firmware, including that of Intel Macs, leaves the APs
with an invalid MTRR state after resume. x86 delays the AP cache
initialization until all APs are online, so an affected AP runs
uncached through its bring-up. On a Core i9 MacBook Pro a resume can
take up to a minute.

Drop the x86 thaw hooks so that cache_ap_online() restores the MTRR and
PAT state of each AP as it comes online, as on CPU hotplug. The APs then
come online right away. Boot keeps the delayed initialization.

Tested on a MacBookAir9,1, MacBookPro15,1 and MacBookPro16,1.

Link: https://lore.kernel.org/all/20180319041843.28218-1-yu.c.chen@intel.com/
Link: https://lore.kernel.org/all/aoCJGj8HixmJ9oaZ@wunner.de/
Suggested-by: Chen Yu <yu.c.chen@intel.com>
Signed-off-by: Andre Eikmeyer <dev@deq.rocks>
---
 arch/x86/kernel/smpboot.c | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index dcbaf3f27..bb3fc9a7c 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -1251,16 +1251,6 @@ void __init native_smp_prepare_cpus(unsigned int max_cpus)
 	snp_set_wakeup_secondary_cpu();
 }
 
-void arch_thaw_secondary_cpus_begin(void)
-{
-	set_cache_aps_delayed_init(true);
-}
-
-void arch_thaw_secondary_cpus_end(void)
-{
-	cache_aps_init();
-}
-
 /*
  * Early setup to make printk work.
  */

base-commit: c6279551a44c06f4cb1f7b1df2fb8e0d6d6e54cd

                 reply	other threads:[~2026-11-11 12:37 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261111123747.49446-1-dev@deq.rocks \
    --to=dev@deq.rocks \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=lukas@wunner.de \
    --cc=mingo@redhat.com \
    --cc=rafael@kernel.org \
    --cc=tglx@kernel.org \
    --cc=x86@kernel.org \
    --cc=yu.c.chen@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®