[tip:,x86/urgent] x86/ACPI/boot: Use FADT version to check support for online capable
Message ID | 168016878085.404.6003734700616193238.tip-bot2@tip-bot2 |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp997426vqo; Thu, 30 Mar 2023 02:36:46 -0700 (PDT) X-Google-Smtp-Source: AKy350ZkSHTYRgSECdsZVLMkSSUyv/CUMN4TlQHc77TbctcIL7dDdrtJ3iTxEMwVcI15jry+qumY X-Received: by 2002:a17:907:7f86:b0:926:9c33:ea4 with SMTP id qk6-20020a1709077f8600b009269c330ea4mr25515246ejc.27.1680169006242; Thu, 30 Mar 2023 02:36:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680169006; cv=none; d=google.com; s=arc-20160816; b=G3X9JGUzE49fdW121PEUf+UkErDqmUxH74flwZ6ZHehW+9TJBzU5tRsYQucGGuqu9p qce3ZLtk7woWtCCSX5t7LL+XZj3v5JTbsknABpDcgZVNPGFHVr1tsNiJtM17KHI7s1+W M1RyB1Np5ErQ+6ZPndCxm+loaBwSH4pN8VTaLYJbmOQ3ai5L6axHMRylNPBLkJM4QRjU ZD+Wuemkw1Z6UhOtPIFREYwRWVRsQ6bx1tIzw1I1O52nyv5PDCzp5Kyz7DN/hoGLsLWV KtIU5QH4xh6p7i523C3Vtnwl9Lzhcy09bHeTqczRcel3zXExv+YH08tMOf31AZ/StHZI fM2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=R/5YEIu7OURMmSlptDaTTLCcQHDxaQcGsTk6gemD5Q0=; b=H9Rf7bZ2hBt9Shf7bEeyzxmo6C3xTjGneXmKcFI9fIiAegY3L2csWokZCjwii3CLsJ bNNrODYVHt0eZsO6XnL7WiIa0KGlxuRxZUEsNTYUWbjGtgD1a2ASXHEMuVEL2Coxdopj hBoEJ/rBZPhN02y5XOYtwlLfdg/dbrwq+c5KC6EFplBt6a44sG23G8Jm2EQDs0XUuYAk tiNdkV+e2uBGBifm4k3IR2IUGasaielpWVCGxXFS5oCybhO15opLqbQJQ56qsV+MR6iH /HN0HGXt3LAm69Ph59YRNOrJTioSgCZbhXkuS1MLULWaoQdw1gL610uuIuY2PlNjTZnr Ix5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=dpEFt7fE; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qa36-20020a17090786a400b0093e601a52e9si16305845ejc.41.2023.03.30.02.36.22; Thu, 30 Mar 2023 02:36:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=dpEFt7fE; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230215AbjC3JdK (ORCPT <rfc822;rua109.linux@gmail.com> + 99 others); Thu, 30 Mar 2023 05:33:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229728AbjC3JdI (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 30 Mar 2023 05:33:08 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF8776A63; Thu, 30 Mar 2023 02:33:02 -0700 (PDT) Date: Thu, 30 Mar 2023 09:33:00 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1680168781; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=R/5YEIu7OURMmSlptDaTTLCcQHDxaQcGsTk6gemD5Q0=; b=dpEFt7fE+e+WIDhL3UhPDpFlvPgrE4zLi+7G1hXonfThL4RQyXb2oRrM8yPEu7vPEtfIqm DbuT+kR1HRyzsNpr6+yehVVU43k8swb9J7wa2/Lr98/Ue8T+z8Dk3pK/ZdazeltydKFii0 XtmbRtC01blHxanQiJvbX7ZgL29/B3qmdKZCdaUJzJN/0uvi4hTyVMM6AAPBiefBmq2vNY AmtUeJ+eqHicCaQXPmXqlibiM8OnaI2LRjBbA79isl4nDFocrqFO2Fgu3O3DOT+lh9xtFh r6nw8fyBdCOjPvtWs3qo+ehRxlxWKa7TJmbKo3T6LlQHpx2bwePZfK3lSE3tGw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1680168781; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=R/5YEIu7OURMmSlptDaTTLCcQHDxaQcGsTk6gemD5Q0=; b=qR+A+vsl4CuQ+nib0l9qMCCjDxhA9Ro0Q++qBA1MWrmoQ30+ZAARqOG0IIxS9wyNOEZvzJ E9dO2BocU42g+kBQ== From: "tip-bot2 for Mario Limonciello" <tip-bot2@linutronix.de> Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/urgent] x86/ACPI/boot: Use FADT version to check support for online capable 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 In-Reply-To: <943d2445-84df-d939-f578-5d8240d342cc@unsolicited.net> References: <943d2445-84df-d939-f578-5d8240d342cc@unsolicited.net> MIME-Version: 1.0 Message-ID: <168016878085.404.6003734700616193238.tip-bot2@tip-bot2> Robot-ID: <tip-bot2@linutronix.de> Robot-Unsubscribe: Contact <mailto:tglx@linutronix.de> to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761784895800470611?= X-GMAIL-MSGID: =?utf-8?q?1761784895800470611?= |
Series |
[tip:,x86/urgent] x86/ACPI/boot: Use FADT version to check support for online capable
|
|
Commit Message
tip-bot2 for Thomas Gleixner
March 30, 2023, 9:33 a.m. UTC
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,