mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "tip-bot2 for Thomas Gleixner" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Thomas Gleixner <tglx@linutronix.de>,
	"Borislav Petkov (AMD)" <bp@alien8.de>,
	Guenter Roeck <linux@roeck-us.net>,
	x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: x86/urgent] x86/mpparse: Register APIC address only once
Date: Sat, 23 Mar 2024 13:24:48 -0000	[thread overview]
Message-ID: <171120028858.10875.13533785282906224484.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20240322185305.297774848@linutronix.de>

The following commit has been merged into the x86/urgent branch of tip:

Commit-ID:     f2208aa12c27bfada3c15c550c03ca81d42dcac2
Gitweb:        https://git.kernel.org/tip/f2208aa12c27bfada3c15c550c03ca81d42dcac2
Author:        Thomas Gleixner <tglx@linutronix.de>
AuthorDate:    Fri, 22 Mar 2024 19:56:39 +01:00
Committer:     Borislav Petkov (AMD) <bp@alien8.de>
CommitterDate: Sat, 23 Mar 2024 12:41:48 +01:00

x86/mpparse: Register APIC address only once

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 <tglx@linutronix.de>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20240322185305.297774848@linutronix.de
---
 arch/x86/kernel/mpparse.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/x86/kernel/mpparse.c b/arch/x86/kernel/mpparse.c
index 1ccd30c..e89171b 100644
--- a/arch/x86/kernel/mpparse.c
+++ b/arch/x86/kernel/mpparse.c
@@ -197,12 +197,12 @@ static int __init smp_read_mpc(struct mpc_table *mpc, unsigned early)
 	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) {

      parent reply	other threads:[~2024-03-23 13:24 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-22 18:56 [patch 0/4] x86/topology: Cure fallout Thomas Gleixner
2024-03-22 18:56 ` [patch 1/4] x86/cpu: Ensure that CPU info updates are propagated on UP Thomas Gleixner
2024-03-22 21:41   ` Guenter Roeck
2024-03-23 13:24   ` [tip: x86/urgent] " tip-bot2 for Thomas Gleixner
2024-03-22 18:56 ` [patch 2/4] x86/topology: Dont evaluate logical IDs during early boot Thomas Gleixner
2024-03-22 21:41   ` Guenter Roeck
2024-03-23 13:24   ` [tip: x86/urgent] x86/topology: Don't " tip-bot2 for Thomas Gleixner
2024-03-22 18:56 ` [patch 3/4] x86/topology: Handle the !APIC case gracefully Thomas Gleixner
2024-03-22 21:41   ` Guenter Roeck
2024-03-23 13:24   ` [tip: x86/urgent] " tip-bot2 for Thomas Gleixner
2024-03-22 18:56 ` [patch 4/4] x86/mpparse: Register APIC address only once Thomas Gleixner
2024-03-22 21:41   ` Guenter Roeck
2024-03-23 13:24   ` tip-bot2 for Thomas Gleixner [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=171120028858.10875.13533785282906224484.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=bp@alien8.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®