From 4cf65e9cc37f6f1e0467d57a680fcbdeb1a8614d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Sun, 6 Jun 2021 12:03:27 +0300 Subject: [PATCH] cpu/x86/lapic: Drop IOAPIC test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For the purpose of LAPIC IPI messaging it is not required to evaluate if IOAPIC is enabled. The necessary enable_lapic() will still be called as part of setup_lapic() within cpu init. Change-Id: I8b6a34e39f755452f0af63ae0ced7279747c28fc Signed-off-by: Kyösti Mälkki Reviewed-on: https://review.coreboot.org/c/coreboot/+/55251 Tested-by: build bot (Jenkins) Reviewed-by: Arthur Heymans Reviewed-by: Angel Pons --- src/cpu/x86/lapic/lapic_cpu_init.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/cpu/x86/lapic/lapic_cpu_init.c b/src/cpu/x86/lapic/lapic_cpu_init.c index ba88a3662d..589b8fa0dc 100644 --- a/src/cpu/x86/lapic/lapic_cpu_init.c +++ b/src/cpu/x86/lapic/lapic_cpu_init.c @@ -506,18 +506,13 @@ void initialize_cpus(struct bus *cpu_bus) /* Find the info struct for this CPU */ info = cpu_info(); - if (need_lapic_init()) { - /* Ensure the local APIC is enabled */ + /* Ensure the local APIC is enabled */ + if (is_smp_boot()) enable_lapic(); - /* Get the device path of the boot CPU */ - cpu_path.type = DEVICE_PATH_APIC; - cpu_path.apic.apic_id = lapicid(); - } else { - /* Get the device path of the boot CPU */ - cpu_path.type = DEVICE_PATH_CPU; - cpu_path.cpu.id = 0; - } + /* Get the device path of the boot CPU */ + cpu_path.type = DEVICE_PATH_APIC; + cpu_path.apic.apic_id = lapicid(); /* Find the device structure for the boot CPU */ info->cpu = alloc_find_dev(cpu_bus, &cpu_path);