Commit 13af67f5 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

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
parents 164cb546 8cc7dd77
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -1894,6 +1894,7 @@ void __init check_x2apic(void)

static inline void try_to_enable_x2apic(int remap_mode) { }
static inline void __x2apic_enable(void) { }
static inline void __x2apic_disable(void) { }
#endif /* !CONFIG_X86_X2APIC */

void __init enable_IR_x2apic(void)
@@ -2456,6 +2457,11 @@ static void lapic_resume(void *data)
	if (x2apic_mode) {
		__x2apic_enable();
	} else {
		if (x2apic_enabled()) {
			pr_warn_once("x2apic: re-enabled by firmware during resume. Disabling\n");
			__x2apic_disable();
		}

		/*
		 * Make sure the APICBASE points to the right address
		 *