From patchwork Tue Feb 13 21:05:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Gleixner X-Patchwork-Id: 200640 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:bc8a:b0:106:860b:bbdd with SMTP id dn10csp813820dyb; Tue, 13 Feb 2024 13:18:14 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUChPh8NK4IEp2JzQOte8+QceBk6f8n8xD/gtXPYdhShX4GTqq7iZ46ooLsxVtVJaP8DkrIsHfM9I488sADjBv2A48y0g== X-Google-Smtp-Source: AGHT+IE9qI4Pm/SQwkHm8yvNmOcRQqH36VUH/hjOWI5HgsIVpVTjGsc9NkdjwBZ9bbMUFGDst4kW X-Received: by 2002:a05:6870:e3ce:b0:21c:c64e:e18 with SMTP id y14-20020a056870e3ce00b0021cc64e0e18mr630452oad.15.1707859093895; Tue, 13 Feb 2024 13:18:13 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707859093; cv=pass; d=google.com; s=arc-20160816; b=IwZ1NPT5cUkqgKksHG0t6RaW2a4yeJM2PDb2JkyAIbV/LwjhWK/6+dBVtHRVClSPsK FcPw6GAy3SCaaeexQ5tlP8vWMnYQPI/zzZbAr6cE5l3Ah+vYlwNWMrb/xDeM//dKrLL5 g43BIoW0KTX5mqTxCbJ3HIS25AYkJK3ehH8iFq0jBbQgGwm7InHyDmTcsd85G6X67J3C qVSq4EWlcVDBJUQ4QSOC+8mTxCPCYuyNQFj25aTQnzkUSmKFw79hrrYC6IcfML7hyLvW 0njV/BTiAk403KLvBt3wZp53dZTPL0JlQHO+XgmhBWDNSuJ9PtVuJkdTp555mljKXe0d SiJw== 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=iPIO3QNFvW48Z4fwWQKzNfHw1Ui9AWcsndYWsHIVMwk=; b=QbZStEpPX+NOMKPIcOtPZpFrr/xSZcH04xgf2JFZa6eV7fX8gUca+FDONUTgef4Lzc iZHjDZfFmdQ57hddays/hmVfY6U09SjdieA5/4TkUsE08LS0R1JBJr+sjjOJQ4bMtlgn DnRPjVSyWuYgNF0gEZmT5jmGDIVCHE27zaIGLdTqJ9CmwkdhFx38HKBC2sS4xHqUJZUF raghCBXm1IHlsKHiYk+1Q31TTA8YsrmCBV2ZqzPFX8uDOoPlYwGJ/LUQJyvYEo7jPuS7 9uL1t57LWrw6i/m2V1RQ2UkRneLnmClMMV/Qdmc37AXKj5IVryztWCvNsqMLvoX51PfR O0KQ==; 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-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64297-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de X-Forwarded-Encrypted: i=2; AJvYcCXPDfsdhJyh/sXgO0k1rxoJxYOiKZoxaelQZ31aRaWULDR16erdRTXQdFFrHeFuHm80R5toZSILrG5kOo+X5tFHjJtUUA== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id o18-20020a637e52000000b005dc34c3db42si2557004pgn.259.2024.02.13.13.18.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 13:18:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-64297-ouuuleilei=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-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64297-ouuuleilei=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 58BB0286873 for ; Tue, 13 Feb 2024 21:17:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 47E96811F7; Tue, 13 Feb 2024 21:05:56 +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 Date: Tue, 13 Feb 2024 22:05:50 +0100 (CET) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790820057141941957 X-GMAIL-MSGID: 1790820057141941957 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; }