Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp1168810rdb; Fri, 16 Feb 2024 07:20:33 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCW9Vke1Iy5I2y1D3xwnnwU5GlJlQV1XgTb29GhuOnJESGc9D8vPIh5iyGum+5jBJXy0eOduNt/sVYs13xyrjltvK0uYQMiL1gqHOBLiPg== X-Google-Smtp-Source: AGHT+IFwN8L2JsEiFE62ZEMzdQ+bN2z0Ahg4NirDEXopdeL3uyticr64F1M/8pJuCfS1XJTfVFQn X-Received: by 2002:a05:622a:30c:b0:42d:a95e:7c2a with SMTP id q12-20020a05622a030c00b0042da95e7c2amr6000030qtw.52.1708096832794; Fri, 16 Feb 2024 07:20:32 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708096832; cv=pass; d=google.com; s=arc-20160816; b=hfwTCEKgvcO3ybcSWmjulY6fD/Tn5c5yor/D0DVOAo/IhFi5+R9Q1R8RXODLYyRESR uQk+pI9tAUghmKI9vSdSJ6srt0WJUh3xRS15Bajy6f4bN+GRg0Umgtc5kTV5+oIqM1OX bA6+UuY/iAkKyNyzduwA+Q4O449JJZlu/vVMvnPW4oolQH4TkGC7YJ1becc5qVhWjHvx lPgO+b6jg74PT2R/ZMRdWTi7xK71+cgRgIXsYsA243TRz8uknScpybpiJr7pH1wbFxuc JjEKwZyUmxI30lcE4tzMeku/suJBo+rchGotQDuD5nl5NwDSmGxSa5/izfelrda+5EOM Zjww== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:precedence:robot-unsubscribe:robot-id :message-id:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:references:in-reply-to:cc:subject:to:reply-to:sender :from:dkim-signature:dkim-signature:date; bh=CgU9XkMX1iVwxGYeW6SwPP/gtNmhIR2dG3bF01DfNTQ=; fh=HfXWoIhgCc+vt39DMIJv/Ec0aAKnw0eFA8QxuIQTUoQ=; b=StDnjGUxsGOADmmmuI2qygeTep3rAFBWpYQpdEB2E851Oe64NsiMU0YVofjnZGZx0P xjBs3f9wGr+6tnS8u7xV4l31y+xxBzVLJSCukjpk3gIOVKK+ngv/wxSNqd093j9pecAH T4VVB9CIRFgAfg6DDwfYefgtcVSmrZiH86fsxgeChig1pIntjrSWerSvZXWFuVPb46ol 7rbrBROcvf8XQNUbDGeNLH0W6tdQko/yMoAKFKUhCX0RzHvi9/fB6TxlhuGyuz10NNha sxebyxD3KQUy5eNbRB2gQCoZPICAtB7V5iExoQ4FgXdKzVNhAlyYdKGXM04qM4XcE1yQ iJBQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=kXd0r8r0; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-68808-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68808-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id s30-20020a05622a1a9e00b0042ddd44ed06si13774qtc.689.2024.02.16.07.20.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 07:20:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-68808-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=kXd0r8r0; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-68808-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68808-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id AFF271C2280A for ; Fri, 16 Feb 2024 15:20:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F341A1350CC; Fri, 16 Feb 2024 15:17:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="kXd0r8r0"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="eeWMfgNp" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4BC511339A5; Fri, 16 Feb 2024 15:17:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708096624; cv=none; b=PTYw+zHYP3pfz62bh0gMEimqZNbZhHJISUJVmBRfgXzl0s5TuJSBl2E/TCVlY9Jf3sRXxA94r1uAcyBsPhSoCt1rEyzfbKx+FQpw/e1o6aPYY8t2738K5ZOkA5TcP2rgZ0DgZJHbH4aG3tn5nGC+ksviS1FkFfhnzrdZT7k+P8g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708096624; c=relaxed/simple; bh=xmGVUZQmR7A+48wwUhUUo2iz3g7bbitu+Slr8/DjimA=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=NivvrxZmvpa0aW9BdOI3gZzjwxV2a/+qasc9gQCEL3jfqFpF7l2F8nTVi1OXcB5rzEvGEsoRgajoO1rQhSKnBLvAOh5PsM+v36inweIjtqkKZM7VK1SN6a0ovvvPzbX9xNEDGYYb09x6aOqxloTD2X/7LrWYTIbPjVvrb1oRkKY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=kXd0r8r0; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=eeWMfgNp; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Date: Fri, 16 Feb 2024 15:17:00 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1708096621; 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=CgU9XkMX1iVwxGYeW6SwPP/gtNmhIR2dG3bF01DfNTQ=; b=kXd0r8r0A6o6pspqzctFwophBRpAJ1gMNh9JqQqZsjhMg2Uln1Zgucl8gmKWVwMuD61YaV jPvz8syGlekj9WVu+91adfhgw5ITNSWUx0hmhbEK4uVfS9yUztiUBpnNnvncvTAkTi5lBr hCAEUkeRaXvpvKtsuwauOA9Bf7en61x0dt7bYx3F6pk8iuoiyB2SmPsMgtIuNJbOBw/k0Z RluCiDZ5v4LCDAeWtB0hsHkAkOF3foXuMzhLBiP0JcUzDsMiD/Cml76iVysblFRV5FMwnp RdWwqaArAEB+PGAx0u3Ov4YkMnv00CzqowxdJ+P6w7qCenzANxIoauK9C4RyNw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1708096621; 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=CgU9XkMX1iVwxGYeW6SwPP/gtNmhIR2dG3bF01DfNTQ=; b=eeWMfgNpcmGWYyttkmLjB2AJQ08O1PHqhEb4M8+2HI8OgTfPSxvCC/qBIq8dh6YNZGHsdf /gk52Pnadb8SliAg== From: "tip-bot2 for Thomas Gleixner" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/apic] x86/smpboot: Make error message actually useful Cc: Thomas Gleixner , Michael Kelley , Sohil Mehta , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20240213210252.170806023@linutronix.de> References: <20240213210252.170806023@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <170809662021.398.14979845209789031512.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit The following commit has been merged into the x86/apic branch of tip: Commit-ID: 6055f6cf0d462fa0d9212a8279b6b0d1130552e1 Gitweb: https://git.kernel.org/tip/6055f6cf0d462fa0d9212a8279b6b0d1130552e1 Author: Thomas Gleixner AuthorDate: Tue, 13 Feb 2024 22:05:50 +01:00 Committer: Thomas Gleixner CommitterDate: Thu, 15 Feb 2024 22:07:43 +01:00 x86/smpboot: Make error message actually useful "smpboot: native_kick_ap: bad cpu 33" is absolutely useless information. Replace it with something meaningful which allows to decode the failure condition. Signed-off-by: Thomas Gleixner Tested-by: Michael Kelley Tested-by: Sohil Mehta Link: https://lore.kernel.org/r/20240213210252.170806023@linutronix.de --- arch/x86/kernel/smpboot.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index bfb99b5..d850fac 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c @@ -1072,9 +1072,13 @@ int native_kick_ap(unsigned int cpu, struct task_struct *tidle) pr_debug("++++++++++++++++++++=_---CPU UP %u\n", cpu); - if (apicid == BAD_APICID || !test_bit(apicid, phys_cpu_present_map) || - !apic_id_valid(apicid)) { - pr_err("%s: bad cpu %d\n", __func__, cpu); + if (apicid == BAD_APICID || !apic_id_valid(apicid)) { + pr_err("CPU %u has invalid APIC ID %x. Aborting bringup\n", cpu, apicid); + return -EINVAL; + } + + if (!test_bit(apicid, phys_cpu_present_map)) { + pr_err("CPU %u APIC ID %x is not present. Aborting bringup\n", cpu, apicid); return -EINVAL; }