mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] x86/cache: Restore AP cache state while bringing CPUs online on resume
@ 2026-11-11 12:37 Andre Eikmeyer
  0 siblings, 0 replies; only message in thread
From: Andre Eikmeyer @ 2026-11-11 12:37 UTC (permalink / raw)
  To: tglx, mingo, bp, dave.hansen, x86
  Cc: hpa, linux-kernel, rafael, linux-pm, lukas, yu.c.chen, Andre Eikmeyer

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-11 12:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-11 12:37 [PATCH] x86/cache: Restore AP cache state while bringing CPUs online on resume Andre Eikmeyer

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®