Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1869736rwl; Thu, 30 Mar 2023 02:38:56 -0700 (PDT) X-Google-Smtp-Source: AKy350ZfucCPuJf5U0mWGlSsEZUOzcFJuKl0lNU2Otv1NkijHZC9fKOd4Pc1hmXLBA/9rRZwz29g X-Received: by 2002:a17:906:2098:b0:930:7f40:c1bb with SMTP id 24-20020a170906209800b009307f40c1bbmr1483543ejq.4.1680169135845; Thu, 30 Mar 2023 02:38:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680169135; cv=none; d=google.com; s=arc-20160816; b=vmTsKV+aN5vMG8SYUjhuLTjob1dD8oWevJIiIDD0iL6Zekd1yHY/SFLs5fUje92EIS /zJFWpsmWC9XtNH5viiL7BRQiUxI1i6nNrxOMkAhW8vEvcSBdRmNUBY8CyJRdC+A5MyX uegWrsPPNIE/dVCVjtrmLUc1qm5663fLM0NW67v5WDYxwAKWIGPeO5lanJutzZ6KuaHk Vbek36mhzd5eqxNTKg0qxgSxuxiO0KZXnk2dIGq94K46xJ17SPCi6SQtf8rfLjAKuSnf ikcFSa8oiB6pOpG4H66SKvVEIMwGYiDHq83xcTWO8WrSXpQvIjhjNScNPncl+C51CgAp aFBg== 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.s=2020e; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sb6-20020a1709076d8600b0093b5bc4c792si23555118ejc.749.2023.03.30.02.38.30; Thu, 30 Mar 2023 02:38:55 -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.s=2020e; 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 S229710AbjC3JdM (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 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: X-Mailing-List: linux-kernel@vger.kernel.org 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;