From patchwork Thu Mar 30 09:33:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 76994 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp997649vqo; Thu, 30 Mar 2023 02:37:16 -0700 (PDT) X-Google-Smtp-Source: AKy350YPKTCpIX4AXzOg9fEBaYhYctegn8cWaenamkIYvJioBgki8/gDD9tc4e8dXlSBeRlgdB+e X-Received: by 2002:a17:906:1502:b0:93d:e6c8:ed5e with SMTP id b2-20020a170906150200b0093de6c8ed5emr5394031ejd.20.1680169036576; Thu, 30 Mar 2023 02:37:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680169036; cv=none; d=google.com; s=arc-20160816; b=Ivy60JXwm/wS+itWyLKkPJElDnmTQ+x6bYX/viscZfKnpAouSXDMDogwPtnT/RFCXz bkT2R3idHJx5Z8wDOOrwrGdtcqOTzfec8XYnNv5aqNN1uNmZTCXYrrTsdr9z6BwY1HsJ F5TusVnX1y+Lysv80h2/35DjMjqmAGdJVAnUuZ8nc0N5gaCnvAV4XeDXdfd7OW6qHExC x37XD89DDRfr9KGgfvLW5zbsB3ae6x6VIjN6aoxXx/3egbUDc9AQOhnuqneqy0+OfnL7 BbI5iJkTPpNQ7s9B995HFciowzigt01OOoM0qFe7oCQHIp8UrI7QGvPecEm9oKg/XZy2 jMYA== 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=vqOK79NtrV7he0FM5j2OjTQDuyQecRZj6vRZgqwExg4=; b=XL75rhIVNu2HCAPGlUev2j2NwgCRskrtorPhdrwfba5caCMXqRPlfFxHJmStgu7Qhl 3ZCGD85bYB8dcbqLsY9fZgAxItrpsffVztWHH9GM0ve+xwNeDY3KKcPowBCUSjbWZf4B e3xrSUqXbut7s7CbZQjzNYm0HuNU0kzKwIP1QYFTgT/zNskjR//aSC5hPoaCP3zGyk0S TOZCJ7bJ1qYG3Y3Q1Uinp6ugJpFy5CWEriC229fbHOroLbUm1gQZR2oei1ZF/RrJTePM bP0uNCciNfo0nvSC6zt2+vEZ8DQryeuaMjewxLUPfFHMN7W3rhXT0rV8NI0E22Ltex68 iGNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=b76AvJO2; dkim=neutral (no key) header.i=@linutronix.de header.b=COCFp4z0; 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 tk9-20020a170907c28900b0093e6f40ea12si14773056ejc.111.2023.03.30.02.36.52; Thu, 30 Mar 2023 02:37:16 -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=b76AvJO2; dkim=neutral (no key) header.i=@linutronix.de header.b=COCFp4z0; 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 S230030AbjC3JdM (ORCPT + 99 others); Thu, 30 Mar 2023 05:33:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229814AbjC3JdI (ORCPT ); Thu, 30 Mar 2023 05:33:08 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A4806E93; Thu, 30 Mar 2023 02:33:03 -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=vqOK79NtrV7he0FM5j2OjTQDuyQecRZj6vRZgqwExg4=; b=b76AvJO2QCUzr7uneadSs/vpjdB8eCOtTw59Z8PY3Ww7KYI01iVOX5H6N2c5rVczuoTL0A ua4O0L1MCXV1opaDoVHAbq0PL1qyICyloNiND2vzPZCnzPidfyB4CRKupp87p5Lz6/TmOI 1FL/mdwFnyna1Rap4okeaymaG7dc5ejxj82n8r7gpHHBq6+Il2cHuLH8P4VCVGkx/K/VdT uWLcd5JKG/K4kxm1duR5YVHpTH3NhNz3ynEoa9bC0gk5EbaTiv0JQWkcZnkuZh7cfntOCr s1x/Z+n2DjmaPVhEvztIBDwhxSujR+jtEO8fJHCEpR2lbfOcYDqUf/cpg0dcOA== 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=vqOK79NtrV7he0FM5j2OjTQDuyQecRZj6vRZgqwExg4=; b=COCFp4z0K2EoY/I25UgrX58l47Bk1g6afszS3EVJWvF7f6egDobKI+edqkhiwydXmNEyre sy9/Ox01EOc/OcDw== From: "tip-bot2 for Eric DeVolder" 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: Correct acpi_is_processor_usable() check Cc: Miguel Luis , Boris Ostrovsky , Eric DeVolder , "Borislav Petkov (AMD)" , David R , , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20230327191026.3454-2-eric.devolder@oracle.com> References: <20230327191026.3454-2-eric.devolder@oracle.com> MIME-Version: 1.0 Message-ID: <168016878002.404.5262105401164408214.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761784927409902875?= X-GMAIL-MSGID: =?utf-8?q?1761784927409902875?= 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 AuthorDate: Mon, 27 Mar 2023 15:10:26 -04:00 Committer: Borislav Petkov (AMD) 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 Suggested-by: Boris Ostrovsky Signed-off-by: Eric DeVolder Signed-off-by: Borislav Petkov (AMD) Tested-by: David R Cc: 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;