Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp1342993lqp; Fri, 22 Mar 2024 11:58:28 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU4JjUB0oX6nbqw0O2rmxnb/hq7CkmU5U7gFBVIOSm0pDVfnmIi65FETqT1dTtX02bJBBdahOafndwDK1337Nuz2Cmpf8sEroMaSHYVFQ== X-Google-Smtp-Source: AGHT+IEaE3fT+TdDhkQebu043iPBD7m3LLQIKgBx0TyIWm6zAuutlxFy4JHJcLAt3d05xJ8vK52/ X-Received: by 2002:a92:ca90:0:b0:368:4c11:b56c with SMTP id t16-20020a92ca90000000b003684c11b56cmr413211ilo.11.1711133908494; Fri, 22 Mar 2024 11:58:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711133908; cv=pass; d=google.com; s=arc-20160816; b=yg/+rVgK92HsxoJadsWaVHCJDjEN3SvzSQXl7nSfbm0YQrMqnVsDbRZeg+tV75jtY9 ttmvBMUxK77+dVlZIXZBhFmb+cJlKYbRmyRHAhatbAtNn/ShWwxR2MFhUEu05koFjmmH fpYlOwN/oUBISvYWP5Sn3bJEADecRh2bDPAgp+yklNlOIwAB+rhYluZXVmn/VOu0rhHJ X8sI9tFPDk6Mnc8DC4jcIvA5amcdcMt5ti0lI1cTWnnXX8BaQN3X5wm3F39EaLG8MHQp 2oQPEWy7daYQJQhOJzmtIw/26NwiZWiVD46889w6TVpvM9P2yVir9+JMtX/2UaKT+jLs 4W6A== 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=mTgiiqmXpDlu2wr754bEzodBYm+Wxgin5W5FXRk38D4=; fh=tUdGdByweHVV+wXw6qzBGm3LKsVsTQuKsQmaC89g1W4=; b=W6QQBHqfz5itVNjOcV5uHfMPpzfGryhpDnVFyMdR4acBh08EfG+e0KdrxLyZHwa/vV KteKDFhCmS8Si/d+1vJeMb+WWtQBCqSg44bwzrliVatT/N65PHg1kZOCeDl+Pes0aOQd Cn9F6dV9EN3qUp/53kcKxBjgyQ42e0Vp/vOuwv7alQLblEEx31he745WEDwrPtehRGin eVuc2msHc6Fe0p2j89t1czW3gGGwKfaX13SZcbm5r8S80iNPaGucWtNqex5MPh08AoPb n6IbvBVKatye6qI4IpOmH54dosj7YknncT5K1QzeO1n024U7jHqiAkB0s3p0yPk1Vfbr Tr7g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Mm2ZrNSJ; 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-111972-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-111972-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 5-20020a630d45000000b005dc816b234esi2555256pgn.629.2024.03.22.11.58.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Mar 2024 11:58:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-111972-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=Mm2ZrNSJ; 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-111972-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-111972-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 C79E7B23273 for ; Fri, 22 Mar 2024 18:57:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B8F8776C7F; Fri, 22 Mar 2024 18:56:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="Mm2ZrNSJ"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="hXTFtEVe" 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 7B03176C64 for ; Fri, 22 Mar 2024 18:56:41 +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=1711133803; cv=none; b=g+qqxDkfs5ZejkhSjRdQkbDGTxGwj+ExvZSreKmtRCz3oH1GNVtTUBoj0FS7WNCQUHwwr3l8rEyBYLjBBKMKdZ96icY7cspvRdzoJ8H450sP2iPztkXDxts7el3r/6QPKfWxX0cutVp5p3jq3yh+zQatlsTHXDG7w0YyxQOoRkM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711133803; c=relaxed/simple; bh=mxq6yoPCsn4NmvEILlkVTNrX+N37V4MD2chnGDWz2Rk=; h=Message-ID:From:To:Cc:Subject:References:MIME-Version: Content-Type:Date; b=GknxAIEjedrjlK3qfT3xNU3zBjtAzavNc3DFT1po4zNYnleH4MEqFae7QOVtBc2y1rYRjaLYLmbtfLsRz0XYhn9PDjSAwZs3qoCgAjg/4DTzd+ZG+FfBkV6xo7JGt+rom/ZBi4AyR+Nn0N6bh08p/XIhymkKxMFlIwa3fZEw45A= 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=Mm2ZrNSJ; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=hXTFtEVe; 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: <20240322185305.297774848@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1711133799; 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=mTgiiqmXpDlu2wr754bEzodBYm+Wxgin5W5FXRk38D4=; b=Mm2ZrNSJgE9OAdDPFrUY+7HQ5w/BQ5G6fso+vIUmXbgeBCG7JSCqx6dYtN/6E/riuqR4y6 mQ++gXpNL4teNlTJbAU5Nv2FTPE4mNl1f9GrPI8U2Bn7TzfQk7ouyNdkivw12RRajEH1Ax NdtiXMRu900pWb3K9LtP7/8+rPz4rd7hul6ahR+md6ns4Fqwat8TGXxjfv5bgFX/lPgddJ /Eb+H1nox6ZDACoeYUOAgStv1mj2BMUBbw5CVCMSaaEy7zFiIt05TJWP3zYDLI73X6W5XD jW1kzA/wMf/JB6JP8IgWbhD1ZJIIPXQZfvtTRBgJ2Sfl95uCOeDwAbmCrCJPHQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1711133799; 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=mTgiiqmXpDlu2wr754bEzodBYm+Wxgin5W5FXRk38D4=; b=hXTFtEVe6KvrhKPlJwAyLdTuffKGKaZfPloANB5XDhE35V9abgORQNy4KZoSgkpaXI5mnI ns/ofbVdS6gb/BBA== From: Thomas Gleixner To: LKML Cc: x86@kernel.org, Guenter Roeck , Linus Torvalds Subject: [patch 4/4] x86/mpparse: Register APIC address only once References: <20240322184944.141421692@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: Fri, 22 Mar 2024 19:56:39 +0100 (CET) The APIC address is registered twice. First during the early detection and afterwards when actually scanning the table for APIC IDs. The APIC and topology core warn about the second attempt. Restrict it to the early detection call. Fixes: 81287ad65da5 ("x86/apic: Sanitize APIC address setup") Signed-off-by: Thomas Gleixner --- arch/x86/kernel/mpparse.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) --- a/arch/x86/kernel/mpparse.c +++ b/arch/x86/kernel/mpparse.c @@ -197,12 +197,12 @@ static int __init smp_read_mpc(struct mp if (!smp_check_mpc(mpc, oem, str)) return 0; - /* Initialize the lapic mapping */ - if (!acpi_lapic) - register_lapic_address(mpc->lapic); - - if (early) + if (early) { + /* Initialize the lapic mapping */ + if (!acpi_lapic) + register_lapic_address(mpc->lapic); return 1; + } /* Now process the configuration blocks. */ while (count < mpc->length) {