Skip to content

Commit 13af67f

Browse files
committed
Merge tag 'x86-urgent-2026-03-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 fix from Ingo Molnar: "Work around S2RAM hang if the firmware unexpectedly re-enables the x2apic hardware while it was disabled by the kernel. Force-disable it again and issue a warning into the syslog" * tag 'x86-urgent-2026-03-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/apic: Disable x2apic on resume if the kernel expects so
2 parents 164cb54 + 8cc7dd7 commit 13af67f

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

arch/x86/kernel/apic/apic.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1894,6 +1894,7 @@ void __init check_x2apic(void)
18941894

18951895
static inline void try_to_enable_x2apic(int remap_mode) { }
18961896
static inline void __x2apic_enable(void) { }
1897+
static inline void __x2apic_disable(void) { }
18971898
#endif /* !CONFIG_X86_X2APIC */
18981899

18991900
void __init enable_IR_x2apic(void)
@@ -2456,6 +2457,11 @@ static void lapic_resume(void *data)
24562457
if (x2apic_mode) {
24572458
__x2apic_enable();
24582459
} else {
2460+
if (x2apic_enabled()) {
2461+
pr_warn_once("x2apic: re-enabled by firmware during resume. Disabling\n");
2462+
__x2apic_disable();
2463+
}
2464+
24592465
/*
24602466
* Make sure the APICBASE points to the right address
24612467
*

0 commit comments

Comments
 (0)