From 9ec7227c9b43df97e3422877b2539db21d47741b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Sun, 17 Oct 2021 08:34:31 +0300 Subject: cpu/x86/lapic: Move LAPIC configuration to MP init MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Implementation for setup_lapic() did two things -- call enable_lapic() and virtual_wire_mode_init(). In PARALLEL_MP case enable_lapic() was redundant as it was already executed prior to initialize_cpu() call. For the !PARALLEL_MP case enable_lapic() is added to AP CPUs. Change-Id: I5caf94315776a499e9cf8f007251b61f51292dc5 Signed-off-by: Kyösti Mälkki Reviewed-on: https://review.coreboot.org/c/coreboot/+/58387 Tested-by: build bot (Jenkins) Reviewed-by: Arthur Heymans --- src/soc/amd/cezanne/cpu.c | 2 -- src/soc/amd/picasso/cpu.c | 2 -- src/soc/amd/sabrina/cpu.c | 2 -- src/soc/amd/stoneyridge/cpu.c | 2 -- 4 files changed, 8 deletions(-) (limited to 'src/soc/amd') diff --git a/src/soc/amd/cezanne/cpu.c b/src/soc/amd/cezanne/cpu.c index 440b5ba28b..adc99d0ba6 100644 --- a/src/soc/amd/cezanne/cpu.c +++ b/src/soc/amd/cezanne/cpu.c @@ -8,7 +8,6 @@ #include #include #include -#include #include #include #include @@ -62,7 +61,6 @@ void mp_init_cpus(struct bus *cpu_bus) static void zen_2_3_init(struct device *dev) { check_mca(); - setup_lapic(); set_cstate_io_addr(); amd_update_microcode_from_cbfs(); diff --git a/src/soc/amd/picasso/cpu.c b/src/soc/amd/picasso/cpu.c index b80b0f7a2e..de6e9c035b 100644 --- a/src/soc/amd/picasso/cpu.c +++ b/src/soc/amd/picasso/cpu.c @@ -10,7 +10,6 @@ #include #include #include -#include #include #include #include @@ -66,7 +65,6 @@ void mp_init_cpus(struct bus *cpu_bus) static void model_17_init(struct device *dev) { check_mca(); - setup_lapic(); set_cstate_io_addr(); amd_update_microcode_from_cbfs(); diff --git a/src/soc/amd/sabrina/cpu.c b/src/soc/amd/sabrina/cpu.c index 0aa487c2f7..c355a704df 100644 --- a/src/soc/amd/sabrina/cpu.c +++ b/src/soc/amd/sabrina/cpu.c @@ -10,7 +10,6 @@ #include #include #include -#include #include #include #include @@ -64,7 +63,6 @@ void mp_init_cpus(struct bus *cpu_bus) static void zen_2_3_init(struct device *dev) { check_mca(); - setup_lapic(); set_cstate_io_addr(); amd_update_microcode_from_cbfs(); diff --git a/src/soc/amd/stoneyridge/cpu.c b/src/soc/amd/stoneyridge/cpu.c index 6be76bfde8..3cd3a9580a 100644 --- a/src/soc/amd/stoneyridge/cpu.c +++ b/src/soc/amd/stoneyridge/cpu.c @@ -9,7 +9,6 @@ #include #include #include -#include #include #include #include @@ -65,7 +64,6 @@ void mp_init_cpus(struct bus *cpu_bus) static void model_15_init(struct device *dev) { check_mca(); - setup_lapic(); /* * Per AMD, sync an undocumented MSR with the PSP base address. -- cgit v1.2.3