Skip to contentSkip to conversation

x86/ACPI: Ignore CPUs that are not online capable for x2apic, entries as well

PATCH Superseded James Puthukattukaran 1 participant 1 message Dec 9, 2022

Subsystems (2)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/ACPI: Ignore CPUs that are not online capable for x2apic, entries as well

Extending the patch commit aa06e20f1be628186f0c2dcec09ea0009eb69778 to be included for acpi_parse_x2apic as well. There is a check for invalid apicid. However, there are BIOSes with madt verison >= 5 support that do not bother setting apic id to an invalid value since they assume the OS will check the enabled and online capable flags.

---
 arch/x86/kernel/acpi/boot.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
arch/x86/kernel/acpi/boot.c +8 -1
index 907cc98b1938..6dc46909bd9a 100644
@@ -208,7 +208,14 @@ acpi_parse_x2apic(union acpi_subtable_headers *header, const unsigned long end)
 	apic_id = processor->local_apic_id;
 	enabled = processor->lapic_flags & ACPI_MADT_ENABLED;
 
-	/* Ignore invalid ID */
+
+	/* don't register processors that can not be onlined */
+	if (acpi_support_online_capable &&
+	    !(processor->lapic_flags & ACPI_MADT_ENABLED) &&
+	    !(processor->lapic_flags & ACPI_MADT_ONLINE_CAPABLE))
+		return 0;
+
+	/* for systems older than madt version 5, ignore invalid ID */
 	if (apic_id == 0xffffffff)
 		return 0;
 
Signature · 1 line
2.31.1