Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp480321rdb; Tue, 23 Jan 2024 05:47:17 -0800 (PST) X-Google-Smtp-Source: AGHT+IG7CHWbnRbvDky46F3v+vRe9s3NrEKhSOEXSSaOKnFP8Ztm05IJA8Rrz9w4A3OzoMzpod5E X-Received: by 2002:a62:8482:0:b0:6db:cdbc:311e with SMTP id k124-20020a628482000000b006dbcdbc311emr5544488pfd.61.1706017637141; Tue, 23 Jan 2024 05:47:17 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706017637; cv=pass; d=google.com; s=arc-20160816; b=Na8t+UVm02PXj5mILMI3XXGJgwYmrhshYDm0elEDevvu6k7YL9TutgaRynlW+NYnU9 JsLnHEFyPDQEaMvinLfW5FwRXyMRrFL+F3fZChW2JQlLYM18vC/7t5db11K0S7bNe42h OfIKVEYHTs4BNterf/ZMfw92Sg/RcetMiWWgnUznJy2WsF75qUb+O9V2MNte8ZGoD7ut 5h2nCJK2j/Tv/7FMb/sEjxMA8/oCChaJv2a9w9yY7tkRYET62OY4kJ0QFcICHW3u///W fdHv17is/3JRy9VVdtttkKIN/FTFxsxuAthpfvPcqTlmK2/Dss8vaArZbLMscvteLZOb PmAw== 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=li4w2vdbyISE1XfrgLq8xoZs22npIVzG+ptbhVSgJdk=; fh=Te0fDPJ/sd+7p881M6fa/oF213lBbJvGdEFWr/TLqNA=; b=pTS436b738fnIAZu3DvFNEbZczBRAktLiOVFJpsKHWiOwSS16HNg7Z4Ci6VVK4Tw0D oSkFN7CJUCW2rxmvAYFRzh6YQqtX5pDoDG4BTQp7M8vPkAJHinDy7EBnMi5ahuZW+4Up CnAROfO+4l7BeMQZtFpR3GzfhzwydfpB+rGn1AF93MIsdBKCfELgCUCCMzGu4CKUMbRM EVeI0z794/TJXsS1RBXJzh4yI4NiE9vfINX5V7gMNGcoTv7B5pJk+GHYhlhcICUSx14N ROU1AzYAwqnYoqs87w42NEeyHOQze3xgQqNsBkHoxSksFenskZm8IM6Poen+057JDMpY Crlw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=vvBKomLL; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=wB07tUSJ; 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-35355-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-35355-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id n2-20020aa78a42000000b006dd7ce8857bsi795777pfa.138.2024.01.23.05.47.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jan 2024 05:47:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-35355-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=vvBKomLL; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=wB07tUSJ; 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-35355-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-35355-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 1878BB23360 for ; Tue, 23 Jan 2024 13:19:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E88D25FB92; Tue, 23 Jan 2024 13:11:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="vvBKomLL"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="wB07tUSJ" 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 D59C3634FF for ; Tue, 23 Jan 2024 13:11:11 +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=1706015473; cv=none; b=T3pOWgYxmUbwOx5bJTqVgMtS7sUUxyaoisO/Ad9abZz/uMbiHADez1y8NBw3q6KF4RuhMTMi/J9PqAruh2X+I5Z+ijLTf5KFpWBHB7vwCiyZan0Nt38fLgp2UoR6iVJOdMzo/SG8zMy3BlJwmMrOSx6U0SZRv5ykyBIsw8lYcb0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706015473; c=relaxed/simple; bh=pTvuAnJJThSlgdgEbCQMraBnOPSI6z92HQWugFcBTWk=; h=Message-ID:From:To:Cc:Subject:References:MIME-Version: Content-Type:Date; b=UlbPxV/r0Sgd/z23w6P+aId1s7ZR1KyBjJxnKgCi68OCkL9Y2MpgCz2D4L1t2Fb92xoBhfb2q4CTh60kpb0LZX4LfgHVNgQbsGee23S5qbXPdUEBTnM2dNYVZtySAZm2cOCk+AVTXDE5x8av2qtgkRqg8iDFQqOGVciVX+FZxrY= 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=vvBKomLL; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=wB07tUSJ; 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: <20240118123649.231006046@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1706015470; 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=li4w2vdbyISE1XfrgLq8xoZs22npIVzG+ptbhVSgJdk=; b=vvBKomLLfP2ncIAAPY0Uj+Fd2PF7YFwzolmwW5SqFon861etYQk7Q1HEFK4+yZTqG0gIfa qLnlKHAQMgq/dXUnQSETbznYaVfzVwcdHgKv9vu5szCG9xGJFkDXvwdfDlrO6HKpP5Mvm6 FhQpQgNa5H845wDnFGl/Xte/WntpyFPkQ0+jsFPKCY9wR5Zc5jMFepyKJDVdWcleKgFzFt ZLw7QXTeIAC/jfIRym57ZfeOKaitQP8YwAyVZrEozX7y5A8gFOelQ8Buv76Xk+ezFi0z+D 6x14djNEqsqrPG0IisfALnoQtrMQtvp7SLuPqKdg1VGviLg7ITJw+SxxhTj25w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1706015470; 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=li4w2vdbyISE1XfrgLq8xoZs22npIVzG+ptbhVSgJdk=; b=wB07tUSJTGuD4NOPu+UBxyj2kfMtYyV1o9X9Pr0LMXrlzuPtJEoqZM6gw7eRhux67geJ9R yUhubWVnjW45MAAg== 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 v2 12/30] x86/smpboot: Make error message actually useful References: <20240118123127.055361964@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, 23 Jan 2024 14:11:09 +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; }