From: James Puthukattukaran <james.puthukattukaran@oracle.com>
To: linux-acpi@vger.kernel.org
Cc: rafael@kernel.org, lenb@kernel.org
Subject: [PATCH] x86/ACPI: Ignore CPUs that are not online capable for x2apic, entries as well
Date: Thu, 8 Dec 2022 22:18:27 -0500 [thread overview]
Message-ID: <c9b08eff-88b3-e52b-ae3e-ed44bfb81091@oracle.com> (raw)
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.
Signed-off-by: James Puthukattukaran<james.puthukattukaran@oracle.com>
Reported-by: Benjamin Fuller<ben.fuller@oracle.com>
---
arch/x86/kernel/acpi/boot.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
index 907cc98b1938..6dc46909bd9a 100644
--- a/arch/x86/kernel/acpi/boot.c
+++ b/arch/x86/kernel/acpi/boot.c
@@ -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;
--
2.31.1
reply other threads:[~2022-12-09 3:18 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=c9b08eff-88b3-e52b-ae3e-ed44bfb81091@oracle.com \
--to=james.puthukattukaran@oracle.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=rafael@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