linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "tip-bot2 for Mario Limonciello" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Eric DeVolder <eric.devolder@oracle.com>,
	Borislav Petkov <bp@alien8.de>,
	Mario Limonciello <mario.limonciello@amd.com>,
	<stable@kernel.org>,
	x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: x86/urgent] x86/ACPI/boot: Use FADT version to check support for online capable
Date: Thu, 30 Mar 2023 09:33:00 -0000	[thread overview]
Message-ID: <168016878085.404.6003734700616193238.tip-bot2@tip-bot2> (raw)
In-Reply-To: <943d2445-84df-d939-f578-5d8240d342cc@unsolicited.net>

The following commit has been merged into the x86/urgent branch of tip:

Commit-ID:     a74fabfbd1b7013045afc8cc541e6cab3360ccb5
Gitweb:        https://git.kernel.org/tip/a74fabfbd1b7013045afc8cc541e6cab3360ccb5
Author:        Mario Limonciello <mario.limonciello@amd.com>
AuthorDate:    Wed, 29 Mar 2023 12:45:35 -05:00
Committer:     Borislav Petkov (AMD) <bp@alien8.de>
CommitterDate: Thu, 30 Mar 2023 10:50:30 +02:00

x86/ACPI/boot: Use FADT version to check support for online capable

ACPI 6.3 introduced the online capable bit, and also introduced MADT
version 5.

Latter was used to distinguish whether the offset storing online capable
could be used. However ACPI 6.2b has MADT version "45" which is for
an errata version of the ACPI 6.2 spec.  This means that the Linux code
for detecting availability of MADT will mistakenly flag ACPI 6.2b as
supporting online capable which is inaccurate as it's an ACPI 6.3 feature.

Instead use the FADT major and minor revision fields to distinguish this.

  [ bp: Massage. ]

Fixes: aa06e20f1be6 ("x86/ACPI: Don't add CPUs that are not online capable")
Reported-by: Eric DeVolder <eric.devolder@oracle.com>
Reported-by: Borislav Petkov <bp@alien8.de>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Cc: <stable@kernel.org>
Link: https://lore.kernel.org/r/943d2445-84df-d939-f578-5d8240d342cc@unsolicited.net
---
 arch/x86/kernel/acpi/boot.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
index 1c38174..7292184 100644
--- a/arch/x86/kernel/acpi/boot.c
+++ b/arch/x86/kernel/acpi/boot.c
@@ -146,7 +146,11 @@ static int __init acpi_parse_madt(struct acpi_table_header *table)
 
 		pr_debug("Local APIC address 0x%08x\n", madt->address);
 	}
-	if (madt->header.revision >= 5)
+
+	/* ACPI 6.3 and newer support the online capable bit. */
+	if (acpi_gbl_FADT.header.revision > 6 ||
+	    (acpi_gbl_FADT.header.revision == 6 &&
+	     acpi_gbl_FADT.minor_revision >= 3))
 		acpi_support_online_capable = true;
 
 	default_acpi_madt_oem_check(madt->header.oem_id,

      parent reply	other threads:[~2023-03-30  9:33 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-27  6:43 Panic starting 6.2.x and later 6.1.x kernels David R
2023-03-27  7:49 ` Borislav Petkov
2023-03-27  8:13   ` David R
2023-03-27 13:49     ` Thomas Gleixner
2023-03-27 13:51       ` David R
2023-03-27 14:23       ` David R
2023-03-27 15:53       ` David R
2023-03-27 16:21         ` David R
2023-03-28 11:02     ` David R
2023-03-28 14:20       ` Borislav Petkov
2023-03-28 15:06         ` David R
2023-03-28 17:10           ` Borislav Petkov
2023-03-28 17:32             ` David R
2023-03-28 17:33               ` Borislav Petkov
     [not found]             ` <9ed16be4-051d-c20f-0410-b8a973c4c09e@disroot.org>
2023-03-29 10:39               ` Borislav Petkov
2023-03-29 16:14                 ` Borislav Petkov
2023-03-29 16:20                   ` David R
2023-03-29 17:51                     ` Limonciello, Mario
2023-03-29 19:03                       ` David R
2023-03-29 19:07                         ` Limonciello, Mario
     [not found]                           ` <a0ca1e4e-891c-273d-e2d8-eeb9fc4d0c77@unsolicited.net>
2023-03-29 19:17                             ` Limonciello, Mario
2023-03-29 19:20                               ` David R
2023-03-29 19:24                                 ` Limonciello, Mario
2023-03-29 19:31                                   ` David R
2023-03-30  9:33 ` tip-bot2 for Mario Limonciello [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=168016878085.404.6003734700616193238.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=bp@alien8.de \
    --cc=eric.devolder@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mario.limonciello@amd.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).