From: "tip-bot2 for Eric DeVolder" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Miguel Luis <miguel.luis@oracle.com>,
Boris Ostrovsky <boris.ovstrosky@oracle.com>,
Eric DeVolder <eric.devolder@oracle.com>,
"Borislav Petkov (AMD)" <bp@alien8.de>,
David R <david@unsolicited.net>, <stable@kernel.org>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: x86/urgent] x86/acpi/boot: Correct acpi_is_processor_usable() check
Date: Thu, 30 Mar 2023 09:33:00 -0000 [thread overview]
Message-ID: <168016878002.404.5262105401164408214.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20230327191026.3454-2-eric.devolder@oracle.com>
The following commit has been merged into the x86/urgent branch of tip:
Commit-ID: fed8d8773b8ea68ad99d9eee8c8343bef9da2c2c
Gitweb: https://git.kernel.org/tip/fed8d8773b8ea68ad99d9eee8c8343bef9da2c2c
Author: Eric DeVolder <eric.devolder@oracle.com>
AuthorDate: Mon, 27 Mar 2023 15:10:26 -04:00
Committer: Borislav Petkov (AMD) <bp@alien8.de>
CommitterDate: Thu, 30 Mar 2023 11:07:30 +02:00
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: e2869bd7af60 ("x86/acpi/boot: Do not register processors that cannot be onlined for x2APIC")
Suggested-by: Miguel Luis <miguel.luis@oracle.com>
Suggested-by: Boris Ostrovsky <boris.ovstrosky@oracle.com>
Signed-off-by: Eric DeVolder <eric.devolder@oracle.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Tested-by: David R <david@unsolicited.net>
Cc: <stable@kernel.org>
Link: https://lore.kernel.org/r/20230327191026.3454-2-eric.devolder@oracle.com
---
arch/x86/kernel/acpi/boot.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
index 7292184..0dac4ab 100644
--- a/arch/x86/kernel/acpi/boot.c
+++ b/arch/x86/kernel/acpi/boot.c
@@ -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;
prev parent reply other threads:[~2023-03-30 9:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-27 19:10 [PATCH 0/1] x86/acpi: acpi_is_processor_usable() dropping possible cpus Eric DeVolder
2023-03-27 19:10 ` [PATCH 1/1] " Eric DeVolder
2023-03-27 19:57 ` Borislav Petkov
2023-03-27 20:07 ` Eric DeVolder
2023-03-27 20:25 ` Borislav Petkov
2023-03-29 19:34 ` Limonciello, Mario
2023-03-29 19:35 ` Limonciello, Mario
2023-03-30 9:33 ` tip-bot2 for Eric DeVolder [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=168016878002.404.5262105401164408214.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=boris.ovstrosky@oracle.com \
--cc=bp@alien8.de \
--cc=david@unsolicited.net \
--cc=eric.devolder@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=miguel.luis@oracle.com \
--cc=stable@kernel.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).