Received: by 2002:a05:7412:2a91:b0:fc:a2b0:25d7 with SMTP id u17csp179241rdh; Tue, 13 Feb 2024 13:17:55 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUkBJILWGO888SKCLpwd3/sJcbjWyWn7pd5qFh3hh3ytrjMf6tWlAW1GXvHm9fPQlyjceT9quJObu81TB2IwFGFjQbMyt/xkwqsk+78uA== X-Google-Smtp-Source: AGHT+IGUxssW37/Fyepl+BTP5ENbPjend1mlNL3WfkWOrQt/HiXEf4IfEFJVbinFrguiIBjEsmke X-Received: by 2002:a17:902:8690:b0:1da:23e3:1de8 with SMTP id g16-20020a170902869000b001da23e31de8mr651650plo.27.1707859075352; Tue, 13 Feb 2024 13:17:55 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707859075; cv=pass; d=google.com; s=arc-20160816; b=Nrv7ThTfIN4LvCwRXBVy1y7zfXIKf7u6tYCfZ5hM+zQU3E60upEFKGppcKJWios7dG DfyD8XhPxX6xXuS0e7LLW9YrAJiZzGaNidGxAfzCoQqnjb8m1JzSz8FRfqow/2QI96KY 3yVn3XVEKqLkycHZKDkXE2epNhonwwHXjdeCFLOSL8/s4M2z91IIXA7dSvvT2zAoR+WE 5qpIY92RAddP1sdinwliVQoAR8zGGNyPsaGukljGJHwqvBRGKAZfJ3F94wwQr/ymy3kS 8PWX1YnJ1MhIBm2c/Xtt8OawDzmXx+zSclz3KaPCT5CafRMvfnI3BaXLzo8egAPcfUD3 4Qbg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=date:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:references:subject:cc:to:from:dkim-signature :dkim-signature:message-id; bh=B36m24M4ceBkId72kqabGdQ4QnOj4P1IRr6RI4djRX0=; fh=ZlGC5NATUS58baYDnDa1+XvqimapXAih/yvocZRwpbY=; b=qYMLDWpvk+NS7r8DOl+adZQfg+ObpNEDq+w+uH6lw+TI8pQseRRqYEh5TSb1SJ29v+ mLNOPMfRLdx6JytfQ6hLY2kcIRgm3VSmqCsis/hjk7SmQw43H+OMKbZYfUXJXSqoTdnW qUcNgeuYyuHhloxCSfQPNLZu2VR7KBjEZComj6uZdz2G91j4RX71gS0GDif/E7JtdxyI NxjUVRcPZLZu2Av1s1hDe0VR0QHZnYF/e/SnygZmGtCqleAoxOurfCvegElU5szN9cj6 ZsyD2Vnbz5Zzm/B8HeP5d6VgECfsfrSHTINN/RzE2pgpnlAEd6WhiVpHOVBTKdAbJ2jO Rx5w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=eTe89Xjw; 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-64297-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64297-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de X-Forwarded-Encrypted: i=2; AJvYcCUiGwbr2UW6SsgV5X4OFdWOgH6F8KViH6RzS0hzD3+7ebbhYFeVsNlvxvwvAeoVTIXTATuM/XQ9oETqjTA7IUeLwDrKwVYBn6lSTWbteQ== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id j4-20020a170903028400b001d717e60007si1053756plr.397.2024.02.13.13.17.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 13:17:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-64297-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=eTe89Xjw; 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-64297-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64297-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 7C85228634E for ; Tue, 13 Feb 2024 21:17:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8D42E7E101; Tue, 13 Feb 2024 21:05:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="eTe89Xjw"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="rc+ZWqrM" 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 50F127E76D for ; Tue, 13 Feb 2024 21:05:52 +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=1707858353; cv=none; b=LFf7/m2VbUPu0VrhKFytED836/bRwoZLYbLAcr8Yoy/5vmVRQm/tq9fJL01Nx7csBo5lQi1/ybIjcAFX5ebfAEsIeNLmaE3TSS1Yvbf5n008PpGgOY2KAkvmckZ2FbZ4FW2O8bDpI3eLJaLSUPu6BVJR/zELCtUR68cZDZRQ0A8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707858353; c=relaxed/simple; bh=R/gkXFCa7QGppvkzNKvypYWWUarLK4WF7H1CZllLDnI=; h=Message-ID:From:To:Cc:Subject:References:MIME-Version: Content-Type:Date; b=AJlPQdFXtYF+wVpnLKUTQxe4FyZaDIlyEGKRua4nGTJlAcPd3cAPgTIbV/a58T1PfYhWeTouOY1x8PTVkMFPbcNJNV3P1bsJgO/TZY2fLVdnwRyPxDw14rWvMqO5j9dCEIjk2o/xG9eQEwdXWU+G2GvwM9ogPFzoEFWleBVdv78= 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=eTe89Xjw; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=rc+ZWqrM; 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 Message-ID: <20240213210252.170806023@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1707858350; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=B36m24M4ceBkId72kqabGdQ4QnOj4P1IRr6RI4djRX0=; b=eTe89XjwswmLTEZXp4GBgTPgUqu7/kJ86OAYnAsJ0r+4KwmEvrE38VqJiul34/OiRpkju1 XOsRW5ceSiPdGrSZBt5yN/m3zWS0of29JRqm4rA5qBmZeeVCfNe+x8IIPpokk2cQJnRe6z bi8Wxu7hm6qrBY39++yWeKw1T34Jey95jMj6J3VVhzbrTOPFwiibqTLk8xNpNRHukiqNXY gA9coNsaqsTVJ7k8GU779PKG/gZxJ7r0O9MfNbdgLzPjJFlRL0zk8vxMxPM095hkRANXzE mupfQj/8lPLAY1/yb/4uqwdu4HWE2BDjGPyHUR8jZw7PktHC1mA/yUj50Uj/1A== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1707858350; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=B36m24M4ceBkId72kqabGdQ4QnOj4P1IRr6RI4djRX0=; b=rc+ZWqrMgaPp6cWD5WnAtrvpaWOyNa3PPcd+03tDCUDeVyP3JPmDJhHMkrvuZBvubBi1Rd fIwsmFSB++O5x6BA== From: Thomas Gleixner To: LKML Cc: x86@kernel.org, Tom Lendacky , Andrew Cooper , Arjan van de Ven , Huang Rui , Juergen Gross , Dimitri Sivanich , Sohil Mehta , K Prateek Nayak , Kan Liang , Zhang Rui , "Paul E. McKenney" , Feng Tang , Andy Shevchenko , Michael Kelley , "Peter Zijlstra (Intel)" Subject: [patch 12/30] x86/smpboot: Make error message actually useful References: <20240213205415.307029033@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Date: Tue, 13 Feb 2024 22:05:50 +0100 (CET) From: Thomas Gleixner "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 --- arch/x86/kernel/smpboot.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) --- --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c @@ -1072,9 +1072,13 @@ int native_kick_ap(unsigned int cpu, str 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; }