Skip to content

Commit

Permalink
x86/mpparse: Register APIC address only once
Browse files Browse the repository at this point in the history
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: 81287ad ("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
  • Loading branch information
Thomas Gleixner authored and Borislav Petkov (AMD) committed Mar 23, 2024
1 parent 5e25eb2 commit f2208aa
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions arch/x86/kernel/mpparse.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit f2208aa

Please sign in to comment.