ACPI: Add helper for MADT LAPICs
This avoids some code duplication related to X2APIC mode.
Change-Id: I592c69e0f52687924fe41189b082c86913999136
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/74312
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <inforichland@gmail.com>
diff --git a/src/soc/intel/xeon_sp/spr/soc_acpi.c b/src/soc/intel/xeon_sp/spr/soc_acpi.c
index 619e5bb..c609f4f 100644
--- a/src/soc/intel/xeon_sp/spr/soc_acpi.c
+++ b/src/soc/intel/xeon_sp/spr/soc_acpi.c
@@ -540,8 +540,7 @@
}
if (!cpu->enabled)
continue;
- current += acpi_create_madt_lapic((acpi_madt_lapic_t *)current, num_cpus,
- cpu->path.apic.apic_id);
+ current = acpi_create_madt_one_lapic(current, num_cpus, cpu->path.apic.apic_id);
num_cpus++;
}