From patchwork Fri Feb 16 15:17:00 2024 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: 202168 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:c619:b0:108:e6aa:91d0 with SMTP id hn25csp585249dyb; Fri, 16 Feb 2024 07:21:13 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWZJCTCoti98rHa3clvEyXIkD5rEarrToXKevlVb7Wrow5cJY8qsmHXQhoxPKTiOKekElM5XBDFkqHTXEH584p9ZcKgNw== X-Google-Smtp-Source: AGHT+IGNqyvXRS15CGqElkUOZNCn8MWzLdGNC7e4tdssuVUihfDgx/XelkWK+OCB+1oC+9E7oLRx X-Received: by 2002:a17:902:7843:b0:1db:be98:e9a with SMTP id e3-20020a170902784300b001dbbe980e9amr109905pln.26.1708096873229; Fri, 16 Feb 2024 07:21:13 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708096873; cv=pass; d=google.com; s=arc-20160816; b=XFRJWugu0KuRrjVDGcIOijUzDiZfCGN4VBJ2qgZUbqpiKXoqm2jC9LWQh2QdAQJZBI AECHYWZHpdo/H2kpYNW7e+T5Ctt5/cLYJDff5aLC7GA1PFnNAHZmNZzq31VQrBxVfkGK FkcWjMY+vnPiocDdug2bGTu5OLa3TvpXqzCHYo2r5SKTqvrDq7mi19wXI+313YkNFTr+ RaoyvefuVek2IAzd5RUtBJ84BkhtDXbmHAunj2gOCoknccOia8Vf1GBO0C/EDAYVdDA+ bKLr7Uao6FP9oaMTzaZNvRV8f579xGh1vr/R9SUl01YN8sTGAoX4eiw26Gzc7I5ftHC+ bRUg== 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-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68808-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id v5-20020a170903238500b001db7e461d91si3177357plh.545.2024.02.16.07.21.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 07:21:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-68808-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::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-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68808-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 611A32862BB for ; Fri, 16 Feb 2024 15:20:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 157E11353F9; Fri, 16 Feb 2024 15:17:07 +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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790820057141941957 X-GMAIL-MSGID: 1791069387062221709 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; }