Commit fed8d877 authored by Eric DeVolder's avatar Eric DeVolder Committed by Borislav Petkov (AMD)

x86/acpi/boot: Correct acpi_is_processor_usable() check

The logic in acpi_is_processor_usable() requires the online capable
bit be set for hotpluggable CPUs.  The online capable bit has been
introduced in ACPI 6.3.

However, for ACPI revisions < 6.3 which do not support that bit, CPUs
should be reported as usable, not the other way around.

Reverse the check.

  [ bp: Rewrite commit message. ]

Fixes: e2869bd7 ("x86/acpi/boot: Do not register processors that cannot be onlined for x2APIC")
Suggested-by: default avatarMiguel Luis <miguel.luis@oracle.com>
Suggested-by: default avatarBoris Ostrovsky <boris.ovstrosky@oracle.com>
Signed-off-by: default avatarEric DeVolder <eric.devolder@oracle.com>
Signed-off-by: default avatarBorislav Petkov (AMD) <bp@alien8.de>
Tested-by: default avatarDavid R <david@unsolicited.net>
Cc: <stable@kernel.org>
Link: https://lore.kernel.org/r/20230327191026.3454-2-eric.devolder@oracle.com
parent a74fabfb
......@@ -197,7 +197,8 @@ static bool __init acpi_is_processor_usable(u32 lapic_flags)
if (lapic_flags & ACPI_MADT_ENABLED)
return true;
if (acpi_support_online_capable && (lapic_flags & ACPI_MADT_ONLINE_CAPABLE))
if (!acpi_support_online_capable ||
(lapic_flags & ACPI_MADT_ONLINE_CAPABLE))
return true;
return false;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment